Syncronize with 5.6 - __toString should return ""

(cherry picked from commit 2301608736)
This commit is contained in:
Stanislav Malyshev 2016-10-12 23:08:30 -07:00 committed by Anatol Belski
parent 0362d61ab7
commit 94b7ab185c
2 changed files with 2 additions and 2 deletions

View File

@ -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();
}
} /* }}} */

View File

@ -13,4 +13,4 @@ $ci->__toString() // if conversion to string is done by echo, for example, an ex
);
?>
--EXPECTF--
NULL
string(0) ""