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 | f4f2aa7583e19a63bf9c845b0bcb707bccb5cb19 (patch) | |
tree | 8325c10f16a3917c9c0b5784848a202e443f9efa /ext/json/json.c | |
parent | cb7f656de78fa5732795542c53fc14aeb9faa525 (diff) | |
download | php-git-f4f2aa7583e19a63bf9c845b0bcb707bccb5cb19.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 ec76c1d5f3..5d3e441980 100644 --- a/ext/json/json.c +++ b/ext/json/json.c @@ -589,6 +589,8 @@ static PHP_FUNCTION(json_decode) return; } + JSON_G(error_code) = 0; + if (!str_len) { RETURN_NULL(); } |