note 112783 added to function.json-last-error-msg
| From: | Ess | Date: | Mon, 22 Jul 2013 20:19:34 +0000 |
| Subject: | note 112783 added to function.json-last-error-msg | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-195719@lists.php.net to get a copy of this message | ||
If function not exists
<?php
if (!function_exists('json_last_error_msg'))
function json_last_error_msg()
{
switch (json_last_error()) {
default:
return;
case JSON_ERROR_DEPTH:
$error = 'Maximum stack depth exceeded';
break;
case JSON_ERROR_STATE_MISMATCH:
$error = 'Underflow or the modes mismatch';
break;
case JSON_ERROR_CTRL_CHAR:
$error = 'Unexpected control character found';
break;
case JSON_ERROR_SYNTAX:
$error = 'Syntax error, malformed JSON';
break;
case JSON_ERROR_UTF8:
$error = 'Malformed UTF-8 characters, possibly incorrectly encoded';
break;
}
throw new Exception($error);
}
?>
----
Server IP: 69.147.83.199
Probable Submitter: 176.180.39.157
----
Manual Page -- http://php.net/manual/en/function.json-last-error-msg.php
Edit -- https://master.php.net/note/edit/112783
Del: integrated -- https://master.php.net/note/delete/112783/integrated
Del: useless -- https://master.php.net/note/delete/112783/useless
Del: bad code -- https://master.php.net/note/delete/112783/bad+code
Del: spam -- https://master.php.net/note/delete/112783/spam
Del: non-english -- https://master.php.net/note/delete/112783/non-english
Del: in docs -- https://master.php.net/note/delete/112783/in+docs
Del: other reasons-- https://master.php.net/note/delete/112783
Reject -- https://master.php.net/note/reject/112783
Search -- https://master.php.net/manage/user-notes.php