]> granicus.if.org Git - php/commitdiff
Fix bug #48206 again
authorScott MacVicar <scottmac@php.net>
Sat, 9 May 2009 19:42:43 +0000 (19:42 +0000)
committerScott MacVicar <scottmac@php.net>
Sat, 9 May 2009 19:42:43 +0000 (19:42 +0000)
ext/spl/spl_iterators.c

index 5a36bde33deb9d898bd04d8219391f871b920ebe..4dcc48a66e5e5f3b835db144c8f8d6cdb9630e25 100755 (executable)
@@ -600,7 +600,9 @@ SPL_METHOD(RecursiveIteratorIterator, current)
        zval                      **data;
 
        iterator->funcs->get_current_data(iterator, &data TSRMLS_CC);
-       RETURN_ZVAL(*data, 1, 0);
+       if (data && *data) {
+               RETURN_ZVAL(*data, 1, 0);
+       }
 } /* }}} */
 
 /* {{{ proto void RecursiveIteratorIterator::next() U