cvs: php-src(PHP_5_2) /ext/spl spl_iterators.c /ext/spl/tests iterator_044.phpt
| From: | Felipe Pena | Date: | Tue, 20 Jan 2009 00:47:03 +0000 |
| Subject: | cvs: php-src(PHP_5_2) /ext/spl spl_iterators.c /ext/spl/tests iterator_044.phpt | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-55782@lists.php.net to get a copy of this message | ||
felipe Tue Jan 20 00:47:03 2009 UTC
Modified files: (Branch: PHP_5_2)
/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.34&r2=1.73.2.30.2.35&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.34
php-src/ext/spl/spl_iterators.c:1.73.2.30.2.35
--- php-src/ext/spl/spl_iterators.c:1.73.2.30.2.34 Wed Dec 31 11:17:44 2008
+++ php-src/ext/spl/spl_iterators.c Tue Jan 20 00:47:01 2009
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: spl_iterators.c,v 1.73.2.30.2.34 2008/12/31 11:17:44 sebastian Exp $ */
+/* $Id: spl_iterators.c,v 1.73.2.30.2.35 2009/01/20 00:47:01 felipe Exp $ */
#ifdef HAVE_CONFIG_H
# include "config.h"
@@ -2030,6 +2030,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) {
@@ -2066,6 +2067,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) {
@@ -2090,6 +2092,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) {
@@ -2117,6 +2120,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) {
@@ -2139,6 +2143,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&r2=1.1.2.4&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
php-src/ext/spl/tests/iterator_044.phpt:1.1.2.4
--- php-src/ext/spl/tests/iterator_044.phpt:1.1.2.3 Wed Apr 18 08:06:29 2007
+++ php-src/ext/spl/tests/iterator_044.phpt Tue Jan 20 00:47:03 2009
@@ -72,8 +72,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