Skip to content

Commit

Permalink
Merge pull request #10 from amocrm/hotfix/issue#8
Browse files Browse the repository at this point in the history
button fix
  • Loading branch information
bessudnov authored Jun 6, 2020
2 parents cb5df8c + 3f65ccf commit 8344fe7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/AmoCRM/OAuth/AmoCRMOAuth.php
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ public function getResourceOwner(AccessTokenInterface $accessToken): ResourceOwn
*/
public function getOAuthButton(array $options = []): string
{
if (isset($options['color']) && !in_array($options['color'], self::BUTTON_COLORS, true)) {
if (isset($options['color']) && !array_key_exists($options['color'], self::BUTTON_COLORS)) {
throw new BadTypeException('Invalid color selected');
}

Expand Down

0 comments on commit 8344fe7

Please sign in to comment.