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.
This commit is contained in:
Eloy Lafuente (stronk7) 2019-12-01 17:44:52 +01:00
parent 309912cfca
commit a6e544e825
2 changed files with 14 additions and 1 deletions

View File

@ -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;

View File

@ -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