Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Decrypt.php #1

Open
wants to merge 1 commit into
base: v2.1
Choose a base branch
from
Open

Update Decrypt.php #1

wants to merge 1 commit into from

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