Skip to content

Commit 690e330

Browse files
authored
[BUGFIX] Fix undefined local variable in CalcFunction::parse() (#593)
Fixes #585
1 parent 1b4dc29 commit 690e330

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
@@ -45,6 +45,7 @@ This project adheres to [Semantic Versioning](https://semver.org/).
4545

4646
### Fixed
4747

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

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
@@ -85,7 +85,7 @@ public static function parse(ParserState $oParserState, $bIgnoreCase = false): C
8585
sprintf(
8686
'Next token was expected to be an operand of type %s. Instead "%s" was found.',
8787
implode(', ', $aOperators),
88-
$oVal
88+
$oParserState->peek()
8989
),
9090
'',
9191
'custom',

0 commit comments

Comments
 (0)