-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Hotfix: correct array indicies when using ternary or coalesce ops
Fixes #2694 I have find out that the issue is also when using coalesce operator. Example, which is valid code, but has no sens would be: ```php $array = [ 'foo' => 'foo', 'bar' => $baz ? ['abc'] : ['def'], 'hey' => $baz ?? ['one'] ?? ['two'], ]; ``` Without fix we have 5 elements in `$indices` but we should have 3. Added tests to cover changes.
- Loading branch information
1 parent
ed879f1
commit e6b37df
Showing
4 changed files
with
30 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters