diff options
author | Stanislav Malyshev <stas@php.net> | 2016-10-12 23:08:30 -0700 |
---|---|---|
committer | Anatol Belski <ab@php.net> | 2016-10-13 09:29:46 +0200 |
commit | 7d014f4bd0e48378d3f5bd1f21e0cb37c93612de (patch) | |
tree | 7fba25fd7077fbce348281bfd6cc2dffa13452a9 | |
parent | cb6f00c0a5f380abda201d9d13a10c02ebf97145 (diff) | |
download | php-git-7d014f4bd0e48378d3f5bd1f21e0cb37c93612de.tar.gz |
Syncronize with 5.6 - __toString should return ""
(cherry picked from commit 2301608736c82183f8210053a45f78eeef5b0c74)
-rw-r--r-- | ext/spl/spl_iterators.c | 2 | ||||
-rw-r--r-- | ext/spl/tests/spl_cachingiterator___toString_basic.phpt | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/ext/spl/spl_iterators.c b/ext/spl/spl_iterators.c index 7b4c73dcec..6708689d05 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 0395b3794d..57ca5152ed 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) "" |