Fixed nested filters
This commit is contained in:
parent
ba85357dba
commit
5102381ac5
|
@ -340,10 +340,10 @@ class mtgPHPCodegen extends mtgCodegen
|
|||
if(!is_array($args))
|
||||
throw new Exception("Bad filter args: $args_json");
|
||||
}
|
||||
if ($add_assoc_check)
|
||||
return "\$assoc ? $filter_func($val, '$field_name', \$this, " . str_replace("\n", "", var_export($args, true)) . ") : $val";
|
||||
if($add_assoc_check)
|
||||
$str = "(\$assoc ? $filter_func($str, '$field_name', \$this, " . str_replace("\n", "", var_export($args, true)) . ") : $str)";
|
||||
else
|
||||
return "$filter_func($val, '$field_name', \$this, " . str_replace("\n", "", var_export($args, true)) . ")";
|
||||
$str = "$filter_func($str, '$field_name', \$this, " . str_replace("\n", "", var_export($args, true)) . ")";
|
||||
}
|
||||
else
|
||||
throw new Exception("No such filter '$filter_func'");
|
||||
|
|
Loading…
Reference in New Issue