ofbeaton / oauth2-phabricator

Phabricator Provider for The PHP League OAuth 2.0 Client

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Use array accessor to prevent undefined notices

shadowhand opened this issue · comments

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.

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.

👍