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

remove unset of array key that explicitly does not exist #34

Closed
wants to merge 1 commit into from
Closed

remove unset of array key that explicitly does not exist #34

wants to merge 1 commit into from

Conversation

borbyu
Copy link

@borbyu borbyu commented Aug 19, 2015

depending on notice level, this could cause errors

depending on notice level, this could cause errors
@tocker
Copy link
Contributor

tocker commented Nov 10, 2015

Hi @borbyu ,

Thanks for the PR!
In option_consume, the key may exist with NULL value. Thus unset($options[$option]) is required even if isset returned false.
It would be more accurate to use array_key_exists instead of isset. However inset is much more efficient than array_key_exists - about 5 times as fast!

@tocker tocker closed this Feb 18, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants