jay Thu Sep 11 13:40:18 2003 EDT Modified files: /php-src/ext/standard array.c Log: Fixed bug #25494 (array_merge allowing "false" as argument (silent when non-array is passed)) # 4.3 throws E_NOTICEs, 5 errors out on non-array args as per Ilia's # suggestion. Index: php-src/ext/standard/array.c diff -u php-src/ext/standard/array.c:1.244 php-src/ext/standard/array.c:1.245 --- php-src/ext/standard/array.c:1.244 Tue Aug 12 21:37:31 2003 +++ php-src/ext/standard/array.c Thu Sep 11 13:40:18 2003 @@ -21,7 +21,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: array.c,v 1.244 2003/08/13 01:37:31 sniper Exp $ */ +/* $Id: array.c,v 1.245 2003/09/11 17:40:18 jay Exp $ */ #include "php.h" #include "php_ini.h" @@ -2209,7 +2209,15 @@ efree(args); WRONG_PARAM_COUNT; } - + + for (i=0; i<argc; i++) { + if (Z_TYPE_PP(args[i]) != IS_ARRAY) { + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Argument #%d is not an array", i+1); + efree(args); + return; + } + } + array_init(return_value); for (i=0; i<argc; i++) {
-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php