cvs: php4 /ext/standard array.c
| From: | Moriyoshi Koizumi | Date: | Mon, 09 Dec 2002 15:54:38 +0000 |
| Subject: | cvs: php4 /ext/standard array.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-17032@lists.php.net to get a copy of this message | ||
moriyoshi Mon Dec 9 10:54:38 2002 EDT
Modified files:
/php4/ext/standard array.c
Log:
@- Let array_search() accept objects as a needle under ZendEngine2. (Moriyoshi)
Index: php4/ext/standard/array.c
diff -u php4/ext/standard/array.c:1.209 php4/ext/standard/array.c:1.210
--- php4/ext/standard/array.c:1.209 Fri Dec 6 12:35:52 2002
+++ php4/ext/standard/array.c Mon Dec 9 10:54:38 2002
@@ -21,7 +21,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: array.c,v 1.209 2002/12/06 17:35:52 iliaa Exp $ */
+/* $Id: array.c,v 1.210 2002/12/09 15:54:38 moriyoshi Exp $ */
#include "php.h"
#include "php_ini.h"
@@ -1054,11 +1054,13 @@
zend_get_parameters_ex(ZEND_NUM_ARGS(), &value, &array, &strict) == FAILURE) {
WRONG_PARAM_COUNT;
}
-
+
+#ifndef ZEND_ENGINE_2
if (Z_TYPE_PP(value) == IS_OBJECT) {
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Wrong datatype for first argument");
RETURN_FALSE;
}
+#endif
if (Z_TYPE_PP(array) != IS_ARRAY) {
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Wrong datatype for second argument");