Skip to content

Add the proper Exception message for all JSON error types by PHP - #110

Merged
bshaffer merged 3 commits into
googleapis:masterfrom
gbalduzzi:master
Jun 21, 2017
Merged

Add the proper Exception message for all JSON error types by PHP#110
bshaffer merged 3 commits into
googleapis:masterfrom
gbalduzzi:master

Conversation

@gbalduzzi

@gbalduzzigbalduzzi commented Sep 17, 2016

Copy link
Copy Markdown

Related to issue #99 Unknown JSON error

json_last_error_msg() is not used because it would break compatibility with PHP < 5.5.
This solution supports all error types until 5.5, keeping compatibility with previous versions.

@googlebotgooglebot added the cla: yes This human has signed the Contributor License Agreement. label Sep 17, 2016
@T3RON

T3RON commented Jun 6, 2019

Copy link
Copy Markdown

**> please send me JWT.php fixed for CodeIgniter ...!

seif4847@gmail.com**

my error :

An uncaught Exception was encountered
Type: DomainException
Message: Unknown JSON error: 5
Filename: F:\wamp64\www\fzm\application\helpers\jwt_helper.php
Line Number: 201
Backtrace:
File: F:\wamp64\www\fzm\application\helpers\jwt_helper.php
Line: 132
Function: _handleJsonError
File: F:\wamp64\www\fzm\application\helpers\jwt_helper.php
Line: 42
Function: jsonDecode
File: F:\wamp64\www\fzm\application\helpers\authorization_helper.php
Line: 18
Function: decode
File: F:\wamp64\www\fzm\application\controllers\api\ApiPost.php
Line: 78
Function: validateToken
File: F:\wamp64\www\fzm\application\libraries\REST_Controller.php
Line: 785
Function: call_user_func_array
File: F:\wamp64\www\fzm\index.php
Line: 315
Function: require_once

Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla: yesThis human has signed the Contributor License Agreement.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

@gbalduzzi@T3RON@bshaffer@googlebot