mirror of
https://github.com/php/php-src.git
synced 2024-11-25 19:05:31 +08:00
- MFH: Added missing "return;"
This commit is contained in:
parent
cc9e86a588
commit
d29e47652f
@ -2360,6 +2360,7 @@ SPL_METHOD(CachingIterator, __toString)
|
||||
|
||||
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 @@ SPL_METHOD(CachingIterator, offsetSet)
|
||||
|
||||
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 @@ SPL_METHOD(CachingIterator, offsetGet)
|
||||
|
||||
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 @@ SPL_METHOD(CachingIterator, offsetUnset)
|
||||
|
||||
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 @@ SPL_METHOD(CachingIterator, offsetExists)
|
||||
|
||||
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) {
|
||||
|
@ -70,8 +70,6 @@ $it->test($checks);
|
||||
<?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
|
||||
|
Loading…
Reference in New Issue
Block a user