]> granicus.if.org Git - php/commitdiff
- Partly MFH: return value check fix
authorMarcus Boerger <helly@php.net>
Sat, 12 Mar 2005 23:12:36 +0000 (23:12 +0000)
committerMarcus Boerger <helly@php.net>
Sat, 12 Mar 2005 23:12:36 +0000 (23:12 +0000)
ext/spl/spl_iterators.c

index 87910bcb91454b0af6995ed99a82ed57a9be575f..44ef7fef82b6b2ca4ed33e7e471b613e661a635c 100755 (executable)
@@ -233,7 +233,7 @@ next_step:
                                ce = object->iterators[object->level].ce;
                                zobject = object->iterators[object->level].zobject;
                                zend_call_method_with_0_params(&zobject, ce, NULL, "getchildren", &child);
-                               ce = child ? Z_OBJCE_P(child) : NULL;
+                               ce = child && Z_TYPE_P(child) == IS_OBJECT ? Z_OBJCE_P(child) : NULL;
                                if (!ce || !instanceof_function(ce, spl_ce_RecursiveIterator TSRMLS_CC)) {
                                        if (child) {
                                                zval_ptr_dtor(&child);