Skip to content

Conversation

@sven-81
Copy link

@sven-81 sven-81 commented Nov 26, 2024

  • fix for possibly missing key in yoda condition
  • adding php 8.3

@sven-81 sven-81 closed this Nov 26, 2024
Copy link
Contributor

@MichelHartmann MichelHartmann left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you @sven-81 for your contribution. Please check my comments in the PR, before we can merge the change.

$startOfConditionPtr = $stackPtr;
$endPtr = $tokens[$startOfConditionPtr]['scope_opener'] + 1;
if (array_key_exists('scope_opener', $tokens[$startOfConditionPtr])) {
$endPtr = $tokens[$startOfConditionPtr]['scope_opener'] + 1;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

$endPtr should always be initialized.


$startOfConditionPtr = $stackPtr;
$endPtr = $tokens[$startOfConditionPtr]['scope_opener'] + 1;
if (array_key_exists('scope_opener', $tokens[$startOfConditionPtr])) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you add a test-case for this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

4 participants