diff --git a/CHANGELOG.md b/CHANGELOG.md index f6c7a2b4..5eee8030 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -43,6 +43,7 @@ This project adheres to [Semantic Versioning](https://semver.org/). ### Fixed +- Fix undefined local variable in `CalcFunction::parse()` (#593) - Fix PHP notice caused by parsing invalid color values having less than 6 characters (#485) - Fix (regression) failure to parse at-rules with strict parsing (#456) diff --git a/config/phpstan-baseline.neon b/config/phpstan-baseline.neon index 243e36c4..82fcb3f4 100644 --- a/config/phpstan-baseline.neon +++ b/config/phpstan-baseline.neon @@ -10,8 +10,3 @@ parameters: count: 2 path: ../src/RuleSet/DeclarationBlock.php - - - message: "#^Variable \\$oVal might not be defined\\.$#" - count: 1 - path: ../src/Value/CalcFunction.php - diff --git a/src/Value/CalcFunction.php b/src/Value/CalcFunction.php index f06d9b7e..d0e7cfb3 100644 --- a/src/Value/CalcFunction.php +++ b/src/Value/CalcFunction.php @@ -87,7 +87,7 @@ public static function parse(ParserState $oParserState, $bIgnoreCase = false) sprintf( 'Next token was expected to be an operand of type %s. Instead "%s" was found.', implode(', ', $aOperators), - $oVal + $oParserState->peek() ), '', 'custom',