Skip to content

Conversation

Flashlord
Copy link

If the payload is null, then JsonConverter::decode fail with an incorrect argument error (waiting for string, null sent).
By forcing cast , it allow process to keep going.
I hesitated to throw an exception in that case, but i thought that a token without payload is possible after all.

Please do not submit any Pull Requests here. It will be automatically closed.

You should submit it here: https://github.com/web-token/jwt-framework/pulls

If the payload is null, then JsonConverter::decode fail with an incorrect argument error (waiting for string, null sent).
By forcing cast , it allow process to keep going. 
I hesitated to throw an exception in that case, but i thought that a token without payload is possible after all.
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