summaryrefslogtreecommitdiff
path: root/ext/json/json.c
diff options
context:
space:
mode:
Diffstat (limited to 'ext/json/json.c')
-rw-r--r--ext/json/json.c2
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();
}