From 3de67f9d7d8548c558bdc381cb7799271f65f63b Mon Sep 17 00:00:00 2001 From: Ivan Ganev Date: Tue, 28 Jan 2020 16:06:23 +0200 Subject: [PATCH] fixed unsafe array access causing php notice in certain circumstances --- lessc.inc.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lessc.inc.php b/lessc.inc.php index 37988952..4790adc2 100644 --- a/lessc.inc.php +++ b/lessc.inc.php @@ -662,7 +662,7 @@ protected function zipSetArgs($args, $orderedValues, $keywordValues) { // check for a rest $last = end($args); - if ($last[0] == "rest") { + if (is_array($last) && isset($last[0]) && $last[0] == "rest") { $rest = array_slice($orderedValues, count($args) - 1); $this->set($last[1], $this->reduce(array("list", " ", $rest))); }