|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2016-06-15 16:59 UTC] nikic@php.net
-Status: Open
+Status: Not a bug
[2016-06-15 16:59 UTC] nikic@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sun Oct 26 18:00:01 2025 UTC |
Description: ------------ Prior to PHP 7, the behaviour of an empty string when doing a json_decode() would not cause any error to occur, now with PHP 7 it causes a syntax error to occur. Test script: --------------- json_decode(""); if (json_last_error() > 0) { echo sprintf("%s (%d)\n", json_last_error_msg(), json_last_error()); } Expected result: ---------------- No error returned Actual result: -------------- Error returned; Syntax error (4)