vendor/lessphp: Check for an array before accessing an offset

https://www.php.net/manual/en/migration74.incompatible.php#migration74.incompatible.core.non-array-access
This commit is contained in:
Johannes Meyer 2019-12-04 09:56:08 +01:00
parent 369ffa758e
commit 9c94b9cde7
1 changed files with 1 additions and 1 deletions

View File

@ -662,7 +662,7 @@ class lessc {
// check for a rest
$last = end($args);
if ($last[0] == "rest") {
if (is_array($last) && $last[0] == "rest") {
$rest = array_slice($orderedValues, count($args) - 1);
$this->set($last[1], $this->reduce(array("list", " ", $rest)));
}