Skip to content

Fixed Undefined array key "token"#31

Open
indykoning wants to merge 1 commit intodpdconnect:masterfrom
indykoning:patch-1
Open

Fixed Undefined array key "token"#31
indykoning wants to merge 1 commit intodpdconnect:masterfrom
indykoning:patch-1

Conversation

@indykoning
Copy link
Copy Markdown

When incorrect credentials are used authenticateByPassword returns an empty array instead of an exception or an empty token.

When you try to get the token from this empty array you'd get

Warning: Undefined array key "token" in vendor/dpdconnect/php-sdk/src/Common/AuthenticatedHttpClient.php on line 76 

This PR throws the authenticationException so pages are not broken by missing or incorrect credentials

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.

1 participant