Skip to content

Commit b45c81d

Browse files
committed
[BUGFIX] Fix undefined local variable in CalcFunction::parse()
This is the 8.x backport of #593. Fixes #585
1 parent b48925e commit b45c81d

File tree

3 files changed

+2
-6
lines changed

3 files changed

+2
-6
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ This project adheres to [Semantic Versioning](https://semver.org/).
2121

2222
### Fixed
2323

24+
- Fix undefined local variable in `CalcFunction::parse()` (#593)
2425
- Fix PHP notice caused by parsing invalid color values having less than 6 characters (#485)
2526
- Fix (regression) failure to parse at-rules with strict parsing (#456)
2627

config/phpstan-baseline.neon

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,3 @@ parameters:
1010
count: 2
1111
path: ../src/RuleSet/DeclarationBlock.php
1212

13-
-
14-
message: "#^Variable \\$oVal might not be defined\\.$#"
15-
count: 1
16-
path: ../src/Value/CalcFunction.php
17-

src/Value/CalcFunction.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ public static function parse(ParserState $oParserState, $bIgnoreCase = false)
9191
sprintf(
9292
'Next token was expected to be an operand of type %s. Instead "%s" was found.',
9393
implode(', ', $aOperators),
94-
$oVal
94+
$oParserState->peek()
9595
),
9696
'',
9797
'custom',

0 commit comments

Comments
 (0)