Skip to content
This repository has been archived by the owner on Jan 29, 2020. It is now read-only.

Fixed issue with empty scope being passed throwing exception #45

Merged
merged 1 commit into from Sep 21, 2018
Merged

Fixed issue with empty scope being passed throwing exception #45

merged 1 commit into from Sep 21, 2018

Conversation

sheridans
Copy link
Contributor

Provide a narrative description of what you are trying to accomplish:

  • Are you fixing a bug?
    • Detail how the bug is invoked currently.
    • Detail the original, incorrect behavior.
    • Detail the new, expected behavior.
    • Base your feature on the master branch, and submit against that branch.
    • Add a regression test that demonstrates the bug, and proves the fix.
    • Add a CHANGELOG.md entry for the fix.

When sending post request for authorisation with blank scope following error occurs:
TypeError: trim() expects parameter 1 to be string, null given in file /vendor/zendframework/zend-expressive-authentication-oauth2/src/Repository/Pdo/AbstractRepository.php on line 44

This pull request checks to see if the scope being passed is blank, returns an empty string and returns authorisation.

@ezimuel ezimuel merged commit 356c692 into zendframework:master Sep 21, 2018
@ezimuel
Copy link
Contributor

ezimuel commented Sep 21, 2018

@sheridans thanks for your contribution. I just added a unit test for this PR. Thanks again!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants