com php-src: Syncronize with 5.6 - __toString should re turn "": ext/spl/spl_iterators.c ext/spl/tests/ spl_cachingiterator___toString_basic.phpt
| From: | Stanislav Malyshev | Date: | Thu, 13 Oct 2016 06:09:49 +0000 |
| Subject: | com php-src: Syncronize with 5.6 - __toString should re turn "": ext/spl/spl_iterators.c ext/spl/tests/ spl_cachingiterator___toString_basic.phpt | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-95003@lists.php.net to get a copy of this message | ||
Commit: 2301608736c82183f8210053a45f78eeef5b0c74
Author: Stanislav Malyshev <stas@php.net> Wed, 12 Oct 2016 23:08:30 -0700
Parents: 9c50ba42d6503a5fcfffad6c6823a9bee0e033c0
Branches: PHP-7.0
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=2301608736c82183f8210053a45f78eeef5b0c74
Log:
Syncronize with 5.6 - __toString should return ""
Changed paths:
M ext/spl/spl_iterators.c
M ext/spl/tests/spl_cachingiterator___toString_basic.phpt
Diff:
diff --git a/ext/spl/spl_iterators.c b/ext/spl/spl_iterators.c
index 7b4c73d..6708689 100644
--- a/ext/spl/spl_iterators.c
+++ b/ext/spl/spl_iterators..c
@@ -2810,7 +2810,7 @@ SPL_METHOD(CachingIterator, __toString)
if (Z_TYPE(intern->u.caching.zstr) == IS_STRING) {
RETURN_STR_COPY(Z_STR_P(&intern->u.caching.zstr));
} else {
- RETURN_NULL();
+ RETURN_EMPTY_STRING();
}
} /* }}} */
diff --git a/ext/spl/tests/spl_cachingiterator___toString_basic.phpt
b/ext/spl/tests/spl_cachingiterator___toString_basic.phpt
index 0395b37..57ca515 100644
--- a/ext/spl/tests/spl_cachingiterator___toString_basic.phpt
+++ b/ext/spl/tests/spl_cachingiterator___toString_basic.phpt
@@ -13,4 +13,4 @@ $ci->__toString() // if conversion to string is done by echo, for example, an
ex
);
?>
--EXPECTF--
-NULL
+string(0) ""