Skip to content

Commit

Permalink
[BUGFIX] Fix undefined local variable in CalcFunction::parse() (#617)
Browse files Browse the repository at this point in the history
This is the 8.x backport of #593.

Fixes #585
  • Loading branch information
oliverklee authored Jun 23, 2024
1 parent b48925e commit 7d413c8
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 6 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ This project adheres to [Semantic Versioning](https://semver.org/).

### Fixed

- Fix undefined local variable in `CalcFunction::parse()` (#593)

## 8.5.1

### Fixed
Expand Down
5 changes: 0 additions & 5 deletions config/phpstan-baseline.neon
Original file line number Diff line number Diff line change
Expand Up @@ -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

2 changes: 1 addition & 1 deletion src/Value/CalcFunction.php
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,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',
Expand Down

0 comments on commit 7d413c8

Please sign in to comment.