diff --git a/ext/phar/phar_object.c b/ext/phar/phar_object.c index 2225d21d187a9..1da17b247b246 100644 --- a/ext/phar/phar_object.c +++ b/ext/phar/phar_object.c @@ -1500,7 +1500,7 @@ static int phar_build(zend_object_iterator *iter, void *puser) /* {{{ */ } ZEND_FALLTHROUGH; default: - zend_throw_exception_ex(spl_ce_UnexpectedValueException, 0, "Iterator %s returned an invalid value (must return a string)", ZSTR_VAL(ce->name)); + zend_throw_exception_ex(spl_ce_UnexpectedValueException, 0, "Iterator %s returned an invalid value (must return a string, a stream, or an SplFileInfo object)", ZSTR_VAL(ce->name)); return ZEND_HASH_APPLY_STOP; } diff --git a/ext/phar/tests/phar_buildfromiterator5.phpt b/ext/phar/tests/phar_buildfromiterator5.phpt index 1e937fe4e8dd2..2ddf1c282ecef 100644 --- a/ext/phar/tests/phar_buildfromiterator5.phpt +++ b/ext/phar/tests/phar_buildfromiterator5.phpt @@ -49,4 +49,4 @@ rewind valid current %s(24) "UnexpectedValueException" -Iterator myIterator returned an invalid value (must return a string) +Iterator myIterator returned an invalid value (must return a string, a stream, or an SplFileInfo object) diff --git a/ext/phar/tests/tar/phar_buildfromiterator5.phpt b/ext/phar/tests/tar/phar_buildfromiterator5.phpt index 27d9dc323b415..6a81c1df65d26 100644 --- a/ext/phar/tests/tar/phar_buildfromiterator5.phpt +++ b/ext/phar/tests/tar/phar_buildfromiterator5.phpt @@ -49,4 +49,4 @@ rewind valid current %s(24) "UnexpectedValueException" -Iterator myIterator returned an invalid value (must return a string) +Iterator myIterator returned an invalid value (must return a string, a stream, or an SplFileInfo object) diff --git a/ext/phar/tests/zip/phar_buildfromiterator5.phpt b/ext/phar/tests/zip/phar_buildfromiterator5.phpt index fb34f09095483..3c587dfc9c874 100644 --- a/ext/phar/tests/zip/phar_buildfromiterator5.phpt +++ b/ext/phar/tests/zip/phar_buildfromiterator5.phpt @@ -49,4 +49,4 @@ rewind valid current %s(24) "UnexpectedValueException" -Iterator myIterator returned an invalid value (must return a string) +Iterator myIterator returned an invalid value (must return a string, a stream, or an SplFileInfo object)