scottmac Thu May 14 22:00:38 2009 UTC
Modified files:
/php-src/ext/json json.c
Log:
Throw an error rather than silently changing to the default.
http://cvs.php.net/viewvc.cgi/php-src/ext/json/json.c?r1=1.51&r2=1.52&diff_format=u
Index: php-src/ext/json/json.c
diff -u php-src/ext/json/json.c:1.51 php-src/ext/json/json.c:1.52
--- php-src/ext/json/json.c:1.51 Thu May 14 00:13:57 2009
+++ php-src/ext/json/json.c Thu May 14 22:00:38 2009
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: json.c,v 1.51 2009/05/14 00:13:57 scottmac Exp $ */
+/* $Id: json.c,v 1.52 2009/05/14 22:00:38 scottmac Exp $ */
#ifdef HAVE_CONFIG_H
#include "config.h"
@@ -536,7 +536,8 @@
}
if (depth <= 0) {
- depth = JSON_PARSER_DEFAULT_DEPTH;
+ php_error_docref(NULL TSRMLS_CC, E_WARNING, "Depth must greater
than zero.");
+ RETURN_NULL();
}
ALLOC_INIT_ZVAL(z);
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php