Skip to content

Commit abae36e

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 abae36e

File tree

3 files changed

+3
-6
lines changed

3 files changed

+3
-6
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ This project adheres to [Semantic Versioning](https://semver.org/).
1717

1818
### Fixed
1919

20+
- Fix undefined local variable in `CalcFunction::parse()` (#593)
21+
2022
## 8.5.1
2123

2224
### Fixed

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)