mirror of
https://github.com/fenom-template/fenom.git
synced 2023-08-10 21:13:07 +03:00
Fix custom modifier closure functions call
This commit is contained in:
parent
558cafc1fe
commit
df5fb0516d
@ -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 .= "(";
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user