diff options
author | Ilia Alshanetsky <iliaa@php.net> | 2011-06-01 09:44:38 +0000 |
---|---|---|
committer | Ilia Alshanetsky <iliaa@php.net> | 2011-06-01 09:44:38 +0000 |
commit | a7dfb3155777e3e367d125e8b0c73d3e577678a2 (patch) | |
tree | 792dc9bb614b5a1582f92dbadf19cedcb4c997e4 /ext/json/json.c | |
parent | 6406521a44232d2c62bd60585ec2f8cf3faa89bd (diff) | |
download | php-git-a7dfb3155777e3e367d125e8b0c73d3e577678a2.tar.gz |
Fixed bug #54484 (Empty string in json_decode doesn't reset json_last_error()).
Diffstat (limited to 'ext/json/json.c')
-rw-r--r-- | ext/json/json.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/ext/json/json.c b/ext/json/json.c index db3fad9871..7231e647c3 100644 --- a/ext/json/json.c +++ b/ext/json/json.c @@ -703,6 +703,8 @@ static PHP_FUNCTION(json_decode) return; } + JSON_G(error_code) = 0; + if (!str_len) { RETURN_NULL(); } |