Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Throw notice on array offset access of null/bool/int/etc #4386

Closed
wants to merge 2 commits into from

Conversation

@nikic
Copy link
Member

commented Jul 10, 2019

This is a followup to #2031 for RFC https://wiki.php.net/rfc/notice-for-non-valid-array-container.

This implements the dead-simple variant of throwing a notice for array accesses on null/bool/int/float/resource (everything but array, string and object), while excluding list(), for which we did not reach an agreement on #2031. It does not try to suppress duplicate notices on nested accesses, because the additional complexity is not worthwhile.

@nikic nikic added this to the PHP 7.4 milestone Jul 10, 2019
@nikic nikic changed the base branch from master to PHP-7.4 Jul 10, 2019
@SCIF
SCIF approved these changes Jul 10, 2019
@nikic

This comment has been minimized.

Copy link
Member Author

commented Jul 10, 2019

Merged as c42b7dd and 26431d1.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
2 participants
You can’t perform that action at this time.