Call: Don't precompile arg values when it's not an array

The CSS/LESS callable argument values may not always be an array, but also an object or whateever,
in this case we don't need to precompile the values as they could never be a variable.
This commit is contained in:
Yonas Habteab 2022-06-30 12:03:48 +02:00 committed by Johannes Meyer
parent 9ac1a00e94
commit c29ac9842d
1 changed files with 4 additions and 0 deletions

View File

@ -24,6 +24,10 @@ class Call extends Less_Tree_Call
}
foreach ($this->args as $arg) {
if (! is_array($arg->value)) {
continue;
}
$name = null;
if ($arg->value[0] instanceof Less_Tree_Variable) {
// This is the case when defining a variable with a callable LESS rules such as fade, fadeout..