mirror of
https://github.com/php/php-src.git
synced 2026-03-24 00:02:20 +01:00
Improve error message in Phar::buildFromIterator() (#14145)
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user