From f4f2aa7583e19a63bf9c845b0bcb707bccb5cb19 Mon Sep 17 00:00:00 2001 From: Ilia Alshanetsky Date: Wed, 1 Jun 2011 09:44:38 +0000 Subject: Fixed bug #54484 (Empty string in json_decode doesn't reset json_last_error()). --- ext/json/json.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'ext/json/json.c') 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(); } -- cgit v1.2.1