summaryrefslogtreecommitdiffstats
path: root/710.patch
diff options
context:
space:
mode:
authorRemi Collet <remi@remirepo.net>2019-09-13 15:47:47 +0200
committerRemi Collet <remi@remirepo.net>2019-09-13 15:47:47 +0200
commitad9c356019c290cedd0112fd2aec576249d9375e (patch)
tree9b1018bf83e9584650bd74d544cf80fc0d452492 /710.patch
parent1d20fc1f6533bc195083ba4b34cdb33223575f14 (diff)
- update to 0.8.4HEADmaster
- add patch for PHP 7.4 from https://github.com/leafo/scssphp/pull/710
Diffstat (limited to '710.patch')
-rw-r--r--710.patch42
1 files changed, 42 insertions, 0 deletions
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 <remi@remirepo.net>
+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