mirror of
https://github.com/Mibew/handlebars.php.git
synced 2025-05-02 18:26:40 +03:00
fix #4 , NEED TO ADD SOME TESTS ASAP
This commit is contained in:
parent
30795180a9
commit
ecc1b11f2a
@ -129,9 +129,6 @@ class Handlebars_Template
|
|||||||
$context = new Handlebars_Context($context);
|
$context = new Handlebars_Context($context);
|
||||||
}
|
}
|
||||||
$topTree = end($this->_stack); //This method (render) never pop a value from stack
|
$topTree = end($this->_stack); //This method (render) never pop a value from stack
|
||||||
if (count($topTree) < 3) {
|
|
||||||
print_r($topTree);die();
|
|
||||||
}
|
|
||||||
list($index ,$tree, $stop) = $topTree;
|
list($index ,$tree, $stop) = $topTree;
|
||||||
|
|
||||||
$buffer = '';
|
$buffer = '';
|
||||||
@ -197,7 +194,6 @@ class Handlebars_Template
|
|||||||
}
|
}
|
||||||
$topTree = end($this->_stack); //This method never pop a value from stack
|
$topTree = end($this->_stack); //This method never pop a value from stack
|
||||||
list($index ,$tree, $stop) = $topTree;
|
list($index ,$tree, $stop) = $topTree;
|
||||||
|
|
||||||
while (array_key_exists($index, $tree)) {
|
while (array_key_exists($index, $tree)) {
|
||||||
$current = $tree[$index];
|
$current = $tree[$index];
|
||||||
$index++;
|
$index++;
|
||||||
@ -213,7 +209,7 @@ class Handlebars_Template
|
|||||||
//Ok break here, the helper should be aware of this.
|
//Ok break here, the helper should be aware of this.
|
||||||
$newStack = array_pop($this->_stack);
|
$newStack = array_pop($this->_stack);
|
||||||
$newStack[0] = $index;
|
$newStack[0] = $index;
|
||||||
$newStack[0] = false;
|
$newStack[2] = false;
|
||||||
array_push($this->_stack, $newStack);
|
array_push($this->_stack, $newStack);
|
||||||
}
|
}
|
||||||
return '';
|
return '';
|
||||||
|
Loading…
Reference in New Issue
Block a user