helly Thu Oct 18 03:55:43 2007 UTC
Added files: (Branch: PHP_5_3)
/php-src/ext/spl/tests bug42654.phpt
Modified files:
/php-src/ext/spl spl_array.c
Log:
- Fix #42654 (maybe also a bunch of others)
http://cvs.php.net/viewvc.cgi/php-src/ext/spl/spl_array.c?r1=1.71.2.17.2.13.2.2&r2=1.71.2.17.2.13.2.3&diff_format=u
Index: php-src/ext/spl/spl_array.c
diff -u php-src/ext/spl/spl_array.c:1.71.2.17.2.13.2.2
php-src/ext/spl/spl_array.c:1.71.2.17.2.13.2.3
--- php-src/ext/spl/spl_array.c:1.71.2.17.2.13.2.2 Sun Oct 7 05:22:06 2007
+++ php-src/ext/spl/spl_array.c Thu Oct 18 03:55:42 2007
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: spl_array.c,v 1.71.2.17.2.13.2.2 2007/10/07 05:22:06 davidw Exp $ */
+/* $Id: spl_array.c,v 1.71.2.17.2.13.2.3 2007/10/18 03:55:42 helly Exp $ */
#ifdef HAVE_CONFIG_H
# include "config.h"
@@ -1365,7 +1365,7 @@
Create a sub iterator for the current element (same class as $this) */
SPL_METHOD(Array, getChildren)
{
- zval *object = getThis(), **entry;
+ zval *object = getThis(), **entry, *flags;
spl_array_object *intern =
(spl_array_object*)zend_object_store_get_object(object TSRMLS_CC);
HashTable *aht = spl_array_get_hash_table(intern, 0 TSRMLS_CC);
@@ -1387,7 +1387,10 @@
RETURN_ZVAL(*entry, 0, 0);
}
- spl_instantiate_arg_ex1(Z_OBJCE_P(getThis()), &return_value, 0, *entry
TSRMLS_CC);
+ MAKE_STD_ZVAL(flags);
+ ZVAL_LONG(flags, SPL_ARRAY_USE_OTHER);
+ spl_instantiate_arg_ex2(Z_OBJCE_P(getThis()), &return_value, 0, *entry,
flags TSRMLS_CC);
+ zval_ptr_dtor(&flags);
}
/* }}} */
http://cvs.php.net/viewvc.cgi/php-src/ext/spl/tests/bug42654.phpt?view=markup&rev=1.1
Index: php-src/ext/spl/tests/bug42654.phpt
+++ php-src/ext/spl/tests/bug42654.phpt
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php