diff options
-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 6af40af39b..af458dae4a 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 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) "" |