mirror of
https://github.com/Mibew/handlebars.php.git
synced 2025-05-03 02:26:41 +03:00
make sure that buffer is always a string
This commit is contained in:
parent
35ea671fd7
commit
07c49bbb3f
@ -100,7 +100,7 @@ class Tokenizer
|
|||||||
protected $state;
|
protected $state;
|
||||||
protected $tagType;
|
protected $tagType;
|
||||||
protected $tag;
|
protected $tag;
|
||||||
protected $buffer;
|
protected $buffer = '';
|
||||||
protected $tokens;
|
protected $tokens;
|
||||||
protected $seenTag;
|
protected $seenTag;
|
||||||
protected $lineStart;
|
protected $lineStart;
|
||||||
@ -294,7 +294,7 @@ class Tokenizer
|
|||||||
*/
|
*/
|
||||||
protected function flushBuffer()
|
protected function flushBuffer()
|
||||||
{
|
{
|
||||||
if (!empty($this->buffer) or $this->buffer === '0') {
|
if ($this->buffer !== '') {
|
||||||
$this->tokens[] = array(
|
$this->tokens[] = array(
|
||||||
self::TYPE => self::T_TEXT,
|
self::TYPE => self::T_TEXT,
|
||||||
self::VALUE => $this->buffer
|
self::VALUE => $this->buffer
|
||||||
|
Loading…
Reference in New Issue
Block a user