Fix getModifier arguments in parsers

This commit is contained in:
bzick 2013-07-24 20:56:28 +04:00
parent d977c86116
commit bd69bbd86a

View File

@ -624,7 +624,7 @@ class Template extends Render {
if($tokens->isSpecialVal()) { if($tokens->isSpecialVal()) {
$_exp[] = $tokens->getAndNext(); $_exp[] = $tokens->getAndNext();
} elseif($tokens->isNext("(") && !$tokens->getWhitespace()) { } elseif($tokens->isNext("(") && !$tokens->getWhitespace()) {
$func = $this->_fenom->getModifier($tokens->current()); $func = $this->_fenom->getModifier($tokens->current(), $this);
if(!$func) { if(!$func) {
throw new \Exception("Function ".$tokens->getAndNext()." not found"); throw new \Exception("Function ".$tokens->getAndNext()." not found");
} }
@ -1066,7 +1066,7 @@ class Template extends Render {
*/ */
public function parseModifier(Tokenizer $tokens, $value) { public function parseModifier(Tokenizer $tokens, $value) {
while($tokens->is("|")) { while($tokens->is("|")) {
$mods = $this->_fenom->getModifier($tokens->getNext(Tokenizer::MACRO_STRING) ); $mods = $this->_fenom->getModifier($tokens->getNext(Tokenizer::MACRO_STRING), $this);
if(!$mods) { if(!$mods) {
throw new \Exception("Modifier ".$tokens->current()." not found"); throw new \Exception("Modifier ".$tokens->current()." not found");
} }