Skip to content

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

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

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

Conversation

@gbalduzzi
Copy link
Copy Markdown

@gbalduzzi gbalduzzi commented Sep 17, 2016

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.

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

T3RON commented Jun 6, 2019

**> 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 free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla: yes This human has signed the Contributor License Agreement.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants