cvs: php-src /ext/spl spl_array.c

From: Date: Sat, 20 Mar 2004 16:10:58 +0000
Subject: cvs: php-src /ext/spl spl_array.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-26733@lists.php.net to get a copy of this message
helly Sat Mar 20 11:10:58 2004 EDT Modified files: /php-src/ext/spl spl_array.c Log: Fix return value to match std array func behavior http://cvs.php.net/diff.php/php-src/ext/spl/spl_array.c?r1=1.35&r2=1.36&ty=u Index: php-src/ext/spl/spl_array.c diff -u php-src/ext/spl/spl_array.c:1.35 php-src/ext/spl/spl_array.c:1.36 --- php-src/ext/spl/spl_array.c:1.35 Sat Mar 13 15:00:56 2004 +++ php-src/ext/spl/spl_array.c Sat Mar 20 11:09:42 2004 @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: spl_array.c,v 1.35 2004/03/13 20:00:56 helly Exp $ */ +/* $Id: spl_array.c,v 1.36 2004/03/20 16:09:42 helly Exp $ */ #ifdef HAVE_CONFIG_H # include "config.h" @@ -408,7 +408,7 @@ } /* }}} */ -/* {{{ proto mixed|false ArrayIterator::current() +/* {{{ proto mixed|NULL ArrayIterator::current() Return current array entry */ SPL_METHOD(Array, current) { @@ -424,18 +424,18 @@ if (intern->array->is_ref && spl_hash_pos_exists(intern TSRMLS_CC) == FAILURE) { php_error_docref(NULL TSRMLS_CC, E_NOTICE, "Array was modified outside object and internal position is no longer valid"); - RETURN_FALSE; + return; } if (zend_hash_get_current_data_ex(aht, (void **) &entry, &intern->pos) == FAILURE) { - RETURN_FALSE; + return; } *return_value = **entry; zval_copy_ctor(return_value); } /* }}} */ -/* {{{ proto mixed|false ArrayIterator::key() +/* {{{ proto mixed|NULL ArrayIterator::key() Return current array key */ SPL_METHOD(Array, key) { @@ -453,7 +453,7 @@ if (intern->array->is_ref && spl_hash_pos_exists(intern TSRMLS_CC) == FAILURE) { php_error_docref(NULL TSRMLS_CC, E_NOTICE, "Array was modified outside object and internal position is no longer valid"); - RETURN_FALSE; + return; } switch (zend_hash_get_current_key_ex(aht, &string_key, &string_length, &num_key, 0, &intern->pos)) {

« previous php.cvs (#26733) next »