helly           Tue Aug 31 16:54:00 2004 EDT

  Modified files:              
    /php-src/ext/spl    spl_array.c 
  Log:
  Fix seeking
  
http://cvs.php.net/diff.php/php-src/ext/spl/spl_array.c?r1=1.49&r2=1.50&ty=u
Index: php-src/ext/spl/spl_array.c
diff -u php-src/ext/spl/spl_array.c:1.49 php-src/ext/spl/spl_array.c:1.50
--- php-src/ext/spl/spl_array.c:1.49    Mon Jun 21 15:15:27 2004
+++ php-src/ext/spl/spl_array.c Tue Aug 31 16:54:00 2004
@@ -16,7 +16,7 @@
    +----------------------------------------------------------------------+
  */
 
-/* $Id: spl_array.c,v 1.49 2004/06/21 19:15:27 helly Exp $ */
+/* $Id: spl_array.c,v 1.50 2004/08/31 20:54:00 helly Exp $ */
 
 #ifdef HAVE_CONFIG_H
 # include "config.h"
@@ -716,7 +716,7 @@
 
        zend_hash_internal_pointer_reset_ex(aht, &intern->pos);
        
-       while (position-- > 0 && spl_array_next(intern TSRMLS_CC));
+       while (position-- > 0 && spl_array_next(intern TSRMLS_CC) == SUCCESS);
 } /* }}} */
 
 int spl_array_object_count_elements(zval *object, long *count TSRMLS_DC) /* {{{ */
@@ -737,9 +737,8 @@
                pos = intern->pos;
                *count = 0;
                zend_hash_internal_pointer_reset_ex(aht, &intern->pos);
-               while(intern->pos) {
+               while(intern->pos && spl_array_next(intern TSRMLS_CC) == SUCCESS) {
                        (*count)++;
-                       spl_array_next(intern TSRMLS_CC);
                }
                intern->pos = pos;
                return SUCCESS;

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

Reply via email to