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.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/ext/json/json.c b/ext/json/json.c
index 8fa67ed10..56b8e3c3f 100644
--- a/ext/json/json.c
+++ b/ext/json/json.c
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: json.c 308529 2011-02-21 08:09:02Z scottmac $ */
+/* $Id: json.c 313665 2011-07-25 11:42:53Z felipe $ */
#ifdef HAVE_CONFIG_H
#include "config.h"
@@ -60,7 +60,7 @@ static const function_entry json_functions[] = {
PHP_FE(json_encode, arginfo_json_encode)
PHP_FE(json_decode, arginfo_json_decode)
PHP_FE(json_last_error, arginfo_json_last_error)
- {NULL, NULL, NULL}
+ PHP_FE_END
};
/* }}} */
@@ -589,6 +589,8 @@ static PHP_FUNCTION(json_decode)
return;
}
+ JSON_G(error_code) = 0;
+
if (!str_len) {
RETURN_NULL();
}