mirror of
https://github.com/Mibew/handlebars.php.git
synced 2025-05-02 10:16:41 +03:00
change stack position just if there is stop token available
This commit is contained in:
parent
4244730d24
commit
d43d777ce6
@ -168,10 +168,12 @@ class Handlebars_Template
|
|||||||
throw new RuntimeException('Invalid node type : ' . json_encode($current));
|
throw new RuntimeException('Invalid node type : ' . json_encode($current));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//Ok break here, the helper should be aware of this.
|
if ($this->_stopToken) {
|
||||||
$newStack = array_pop($this->_stack);
|
//Ok break here, the helper should be aware of this.
|
||||||
$newStack[0] = $index;
|
$newStack = array_pop($this->_stack);
|
||||||
array_push($this->_stack, $newStack);
|
$newStack[0] = $index;
|
||||||
|
array_push($this->_stack, $newStack);
|
||||||
|
}
|
||||||
return $buffer;
|
return $buffer;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -201,10 +203,12 @@ class Handlebars_Template
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//Ok break here, the helper should be aware of this.
|
if ($this->_stopToken) {
|
||||||
$newStack = array_pop($this->_stack);
|
//Ok break here, the helper should be aware of this.
|
||||||
$newStack[0] = $index;
|
$newStack = array_pop($this->_stack);
|
||||||
array_push($this->_stack, $newStack);
|
$newStack[0] = $index;
|
||||||
|
array_push($this->_stack, $newStack);
|
||||||
|
}
|
||||||
return '';
|
return '';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user