helly           Sun Jan  1 19:55:27 2006 UTC

  Modified files:              (Branch: PHP_5_1)
    /php-src/ext/spl    spl_iterators.c 
  Log:
  - Just another place where rewind() might not be set
  
http://cvs.php.net/viewcvs.cgi/php-src/ext/spl/spl_iterators.c?r1=1.73.2.19&r2=1.73.2.20&diff_format=u
Index: php-src/ext/spl/spl_iterators.c
diff -u php-src/ext/spl/spl_iterators.c:1.73.2.19 
php-src/ext/spl/spl_iterators.c:1.73.2.20
--- php-src/ext/spl/spl_iterators.c:1.73.2.19   Sun Jan  1 19:51:17 2006
+++ php-src/ext/spl/spl_iterators.c     Sun Jan  1 19:55:27 2006
@@ -16,7 +16,7 @@
    +----------------------------------------------------------------------+
  */
 
-/* $Id: spl_iterators.c,v 1.73.2.19 2006/01/01 19:51:17 helly Exp $ */
+/* $Id: spl_iterators.c,v 1.73.2.20 2006/01/01 19:55:27 helly Exp $ */
 
 #ifdef HAVE_CONFIG_H
 # include "config.h"
@@ -2085,7 +2085,9 @@
        
        iter = Z_OBJCE_P(obj)->get_iterator(Z_OBJCE_P(obj), obj TSRMLS_CC);
 
-       iter->funcs->rewind(iter TSRMLS_CC);
+       if (iter->funcs->rewind) {
+               iter->funcs->rewind(iter TSRMLS_CC);
+       }
        while (iter->funcs->valid(iter TSRMLS_CC) == SUCCESS) {
                count++;
                iter->funcs->move_forward(iter TSRMLS_CC);

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to