From a6e544e825180eba5d657bb839d01bb063825239 Mon Sep 17 00:00:00 2001 From: "Eloy Lafuente (stronk7)" Date: Sun, 1 Dec 2019 17:44:52 +0100 Subject: [PATCH] MDL-67114 scssphp: php74 compatibility local fixes Note they are already available upstream, versions 1.0.4 and up so, in next upgrade they will be fixed. --- lib/scssphp/Compiler.php | 6 +++++- lib/scssphp/moodle_readme.txt | 9 +++++++++ 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/lib/scssphp/Compiler.php b/lib/scssphp/Compiler.php index 8f26740dbe2..75c5d675282 100644 --- a/lib/scssphp/Compiler.php +++ b/lib/scssphp/Compiler.php @@ -2664,11 +2664,15 @@ class Compiler * @param array $value * @param boolean $inExp * - * @return array|\ScssPhp\ScssPhp\Node\Number + * @return null|array|\ScssPhp\ScssPhp\Node\Number */ 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; diff --git a/lib/scssphp/moodle_readme.txt b/lib/scssphp/moodle_readme.txt index 592a0663ca8..f0b5311d5e5 100644 --- a/lib/scssphp/moodle_readme.txt +++ b/lib/scssphp/moodle_readme.txt @@ -7,5 +7,14 @@ Import procedure: - Copy all the files from the folder 'src' this directory. - Copy the license file from the project root. +- Review the local changes defined below, if any. Reapply + them if needed. If already available upstream, please remove + them from the list. Licensed under MIT, Copyright (c) 2015 Leaf Corcoran. + +Currenly using 1.0.2 plus these local changes: + +- MDL-67114 : Added basic compatibility with php 7.4. This corresponds to + upstream commit https://github.com/scssphp/scssphp/commit/66675c1553b7e9d7c480d8aaedbf7c72374647cf + that is available in scssphp >= 1.0.4 -- 2.11.4.GIT