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

Use array accessor to prevent undefined notices #3

Closed
shadowhand opened this issue Nov 22, 2016 · 2 comments
Closed

Use array accessor to prevent undefined notices #3

shadowhand opened this issue Nov 22, 2016 · 2 comments
Assignees
Labels

Comments

@shadowhand
Copy link

Instead of directly accessing arrays it is recommended to use the ArrayAccessorTrait to fetch values. This prevents E_NOTICE warnings from being triggered by PHP when the key is undefined.

Sidenote: in PHP 7 we can use the ?? null coalesce operator instead.

@ofbeaton
Copy link
Owner

Thanks for the report. This was a direct copy of the code in thephpleague's official oauth2-github's GithubResourceOwner so you may want to report it there as well.

@shadowhand
Copy link
Author

👍

@ofbeaton ofbeaton added the bug label Nov 22, 2016
@ofbeaton ofbeaton self-assigned this Nov 22, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants