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: Date: Thu, 13 Oct 2016 23:58:08 +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-95048@lists.php.net to get a copy of this message
Commit: 94b7ab185c589c61b16a172376c386ad82ae7be7 Author: Stanislav Malyshev <stas@php.net> Wed, 12 Oct 2016 23:08:30 -0700 Committer: Anatol Belski <ab@php.net> Fri, 14 Oct 2016 01:58:08 +0200 Parents: 0362d61ab75c4b6faa99ca57d49cd800530b482f Branches: PHP-7.1 Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=94b7ab185c589c61b16a172376c386ad82ae7be7 Log: Syncronize with 5.6 - __toString should return "" (cherry picked from commit 2301608736c82183f8210053a45f78eeef5b0c74) 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 6af40af..af458da 100644 --- a/ext/spl/spl_iterators.c +++ b/ext/spl/spl_iterators.c @@ -2801,7 +2801,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) ""

« previous php.cvs (#95048) next »