felipe          Tue Jan 20 00:43:25 2009 UTC

  Modified files:              (Branch: PHP_5_3)
    /php-src/ext/spl    spl_iterators.c 
    /php-src/ext/spl/tests      iterator_044.phpt 
  Log:
  - MFH: Added missing "return;"
  
http://cvs.php.net/viewvc.cgi/php-src/ext/spl/spl_iterators.c?r1=1.73.2.30.2.28.2.21&r2=1.73.2.30.2.28.2.22&diff_format=u
Index: php-src/ext/spl/spl_iterators.c
diff -u php-src/ext/spl/spl_iterators.c:1.73.2.30.2.28.2.21 
php-src/ext/spl/spl_iterators.c:1.73.2.30.2.28.2.22
--- php-src/ext/spl/spl_iterators.c:1.73.2.30.2.28.2.21 Wed Dec 31 11:15:44 2008
+++ php-src/ext/spl/spl_iterators.c     Tue Jan 20 00:43:25 2009
@@ -16,7 +16,7 @@
    +----------------------------------------------------------------------+
  */
 
-/* $Id: spl_iterators.c,v 1.73.2.30.2.28.2.21 2008/12/31 11:15:44 sebastian 
Exp $ */
+/* $Id: spl_iterators.c,v 1.73.2.30.2.28.2.22 2009/01/20 00:43:25 felipe Exp $ 
*/
 
 #ifdef HAVE_CONFIG_H
 # include "config.h"
@@ -2360,6 +2360,7 @@
 
        if (!(intern->u.caching.flags & 
(CIT_CALL_TOSTRING|CIT_TOSTRING_USE_KEY|CIT_TOSTRING_USE_CURRENT|CIT_TOSTRING_USE_INNER)))
      {
                zend_throw_exception_ex(spl_ce_BadMethodCallException, 0 
TSRMLS_CC, "%s does not fetch string value (see CachingIterator::__construct)", 
Z_OBJCE_P(getThis())->name);
+               return;
        }
        if (intern->u.caching.flags & CIT_TOSTRING_USE_KEY) {
                if (intern->current.key_type == HASH_KEY_IS_STRING) {
@@ -2396,6 +2397,7 @@
 
        if (!(intern->u.caching.flags & CIT_FULL_CACHE))        {
                zend_throw_exception_ex(spl_ce_BadMethodCallException, 0 
TSRMLS_CC, "%s does not use a full cache (see CachingIterator::__construct)", 
Z_OBJCE_P(getThis())->name);
+               return;
        }
 
        if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "sz", &arKey, 
&nKeyLength, &value) == FAILURE) {
@@ -2420,6 +2422,7 @@
 
        if (!(intern->u.caching.flags & CIT_FULL_CACHE))        {
                zend_throw_exception_ex(spl_ce_BadMethodCallException, 0 
TSRMLS_CC, "%s does not use a full cache (see CachingIterator::__construct)", 
Z_OBJCE_P(getThis())->name);
+               return;
        }
 
        if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", &arKey, 
&nKeyLength) == FAILURE) {
@@ -2447,6 +2450,7 @@
 
        if (!(intern->u.caching.flags & CIT_FULL_CACHE))        {
                zend_throw_exception_ex(spl_ce_BadMethodCallException, 0 
TSRMLS_CC, "%s does not use a full cache (see CachingIterator::__construct)", 
Z_OBJCE_P(getThis())->name);
+               return;
        }
 
        if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", &arKey, 
&nKeyLength) == FAILURE) {
@@ -2469,6 +2473,7 @@
 
        if (!(intern->u.caching.flags & CIT_FULL_CACHE))        {
                zend_throw_exception_ex(spl_ce_BadMethodCallException, 0 
TSRMLS_CC, "%s does not use a full cache (see CachingIterator::__construct)", 
Z_OBJCE_P(getThis())->name);
+               return;
        }
        
        if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", &arKey, 
&nKeyLength) == FAILURE) {
http://cvs.php.net/viewvc.cgi/php-src/ext/spl/tests/iterator_044.phpt?r1=1.1.2.3.2.1&r2=1.1.2.3.2.2&diff_format=u
Index: php-src/ext/spl/tests/iterator_044.phpt
diff -u php-src/ext/spl/tests/iterator_044.phpt:1.1.2.3.2.1 
php-src/ext/spl/tests/iterator_044.phpt:1.1.2.3.2.2
--- php-src/ext/spl/tests/iterator_044.phpt:1.1.2.3.2.1 Sat May 24 14:10:44 2008
+++ php-src/ext/spl/tests/iterator_044.phpt     Tue Jan 20 00:43:25 2009
@@ -70,8 +70,6 @@
 <?php exit(0); ?>
 --EXPECTF--
 Exception: MyCachingIterator does not use a full cache (see 
CachingIterator::__construct)
-
-Notice: Undefined index:  0 in %siterator_044.php on line %d
 Exception: MyCachingIterator does not use a full cache (see 
CachingIterator::__construct)
 
 Warning: CachingIterator::offsetExists() expects exactly 1 parameter, 0 given 
in %siterator_044.php on line %d



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

Reply via email to