]> granicus.if.org Git - php/commitdiff
Fix bug #52262 - Invalid UTF-8 documents don't set an error code when they fail to...
authorScott MacVicar <scottmac@php.net>
Tue, 6 Jul 2010 17:01:30 +0000 (17:01 +0000)
committerScott MacVicar <scottmac@php.net>
Tue, 6 Jul 2010 17:01:30 +0000 (17:01 +0000)
ext/json/json.c

index 667774a9119f2d7e3ad510cee2b4f82a92233bcd..e740415ab297b43603b0574171dd8dd963a1c973 100644 (file)
@@ -560,6 +560,7 @@ PHP_JSON_API void php_json_decode_ex(zval *return_value, char *str, int str_len,
                if (utf16) {
                        efree(utf16);
                }
+               JSON_G(error_code) = PHP_JSON_ERROR_UTF8;
                RETURN_NULL();
        }