Use array accessor to prevent undefined notices
shadowhand opened this issue · comments
Woody Gilk commented
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.
Finlay Beaton commented
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.
Woody Gilk commented
👍