From ad9c356019c290cedd0112fd2aec576249d9375e Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Fri, 13 Sep 2019 15:47:47 +0200 Subject: - update to 0.8.4 - add patch for PHP 7.4 from https://github.com/leafo/scssphp/pull/710 --- 710.patch | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 710.patch (limited to '710.patch') diff --git a/710.patch b/710.patch new file mode 100644 index 0000000..2d3592d --- /dev/null +++ b/710.patch @@ -0,0 +1,42 @@ +From 97d14c110e91adc8387b7cb584b99c58ad23715d Mon Sep 17 00:00:00 2001 +From: Remi Collet +Date: Fri, 13 Sep 2019 15:41:13 +0200 +Subject: [PATCH] fix Trying to access array offset on value of type null + +--- + src/Compiler.php | 8 +++++--- + 1 file changed, 5 insertions(+), 3 deletions(-) + +diff --git a/src/Compiler.php b/src/Compiler.php +index d22d0a35..95131df9 100644 +--- a/src/Compiler.php ++++ b/src/Compiler.php +@@ -2552,7 +2552,9 @@ protected function shouldEval($value) + */ + protected function reduce($value, $inExp = false) + { +- ++ if (is_null($value)) { ++ return null; ++ } + switch ($value[0]) { + case Type::T_EXPRESSION: + list(, $op, $left, $right, $inParens) = $value; +@@ -4373,7 +4375,7 @@ protected function sortArgs($prototype, $args) + foreach ($args as $arg) { + list($key, $value) = $arg; + +- $key = $key[1]; ++ $key = (isset($key[1]) ? $key[1] : ''); + + if (empty($key)) { + $posArgs[] = empty($arg[2]) ? $value : $arg; +@@ -5889,7 +5891,7 @@ protected function libStrSlice($args) + $start--; + } + +- $end = (int) $args[2][1]; ++ $end = (isset($args[2][1]) ? (int) $args[2][1] : 0); + $length = $end < 0 ? $end + 1 : ($end > 0 ? $end - $start : $end); + + $string[2] = $length -- cgit