diff options
Diffstat (limited to 'ext/json/json.c')
-rw-r--r-- | ext/json/json.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/ext/json/json.c b/ext/json/json.c index 5b71eb06f6..27aed969d9 100644 --- a/ext/json/json.c +++ b/ext/json/json.c @@ -818,6 +818,7 @@ static PHP_FUNCTION(json_decode) JSON_G(error_code) = 0; if (!str_len) { + JSON_G(error_code) = PHP_JSON_ERROR_SYNTAX; RETURN_NULL(); } |