Update Accessor.php

This commit is contained in:
EMDM45 2021-10-22 12:42:41 +05:00 committed by GitHub
parent decad1d1fa
commit 317c775f50
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -185,8 +185,12 @@ class Accessor {
}
}
if($tokens->is(',')) {
$tokens->skip()->need('[');
$vars = $tpl->parseArray($tokens) . ' + $var';
$tokens->next();
if($tokens->is('[')){
$vars = $tpl->parseArray($tokens) . ' + $var';
}elseif($tokens->is(T_VARIABLE)){
$vars = $tpl->parseExpr($tokens) . ' + $var';
}
} else {
$vars = '$var';
}
@ -210,4 +214,4 @@ class Accessor {
return "array(".implode(",", array_keys($tpl->blocks)).")";
}
}
}
}