php 5.2.x doesn't support closures, so added a private static funtion to be used from array_filter instead
This commit is contained in:
@@ -410,9 +410,7 @@ class Mustache_Compiler
|
|||||||
{
|
{
|
||||||
$block = '';
|
$block = '';
|
||||||
|
|
||||||
$real_children = array_filter($children, function($ch) {
|
$real_children = array_filter($children, array(__CLASS__, 'return_only_parent_args'));
|
||||||
return $ch[Mustache_Tokenizer::TYPE] == Mustache_Tokenizer::T_PARENT_ARG;
|
|
||||||
});
|
|
||||||
|
|
||||||
$block = $this->walk($real_children, $level);
|
$block = $this->walk($real_children, $level);
|
||||||
|
|
||||||
@@ -423,6 +421,11 @@ class Mustache_Compiler
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private static function return_only_parent_args($child)
|
||||||
|
{
|
||||||
|
return $child[Mustache_Tokenizer::TYPE] == Mustache_Tokenizer::T_PARENT_ARG;
|
||||||
|
}
|
||||||
|
|
||||||
const VARIABLE = '
|
const VARIABLE = '
|
||||||
$value = $this->resolveValue($context->%s(%s), $context, $indent);%s
|
$value = $this->resolveValue($context->%s(%s), $context, $indent);%s
|
||||||
$buffer .= %s%s;
|
$buffer .= %s%s;
|
||||||
|
|||||||
Vendored
+1
-1
Submodule vendor/spec updated: bf6288ed6b...7c3923d007
Reference in New Issue
Block a user