Fix custom modifier closure functions call

This commit is contained in:
igorhim 2014-02-18 23:48:56 +02:00
parent 558cafc1fe
commit df5fb0516d

View File

@ -1173,6 +1173,7 @@ class Template extends Render
if (!$mods) { if (!$mods) {
throw new \Exception("Modifier " . $tokens->current() . " not found"); throw new \Exception("Modifier " . $tokens->current() . " not found");
} }
$modifier = $tokens->current();
$tokens->next(); $tokens->next();
$args = array(); $args = array();
@ -1183,7 +1184,7 @@ class Template extends Render
} }
if (!is_string($mods)) { // dynamic modifier if (!is_string($mods)) { // dynamic modifier
$mods = 'call_user_func($tpl->getStorage()->getModifier("' . $mods . '"), '; $mods = 'call_user_func($tpl->getStorage()->getModifier("' . $modifier . '"), ';
} else { } else {
$mods .= "("; $mods .= "(";
} }