1
0
mirror of https://github.com/php/php-src.git synced 2026-03-24 00:02:20 +01:00

Mark Phar::buildFromIterator() base directory argument as a path

This is like buildFromDirectory() which does it right.

Closes GH-20892.
This commit is contained in:
Niels Dossche
2026-01-10 10:52:28 +01:00
parent 2813f62476
commit 9ab800ec9b
2 changed files with 3 additions and 1 deletions

2
NEWS
View File

@@ -54,6 +54,8 @@ PHP NEWS
ignored. (ndossche)
. Support overridden methods in SplFileInfo for getMTime() and getPathname()
when building a phar. (ndossche)
. Mark Phar::buildFromIterator() base directory argument as a path.
(ndossche)
- Reflection:
. Fixed bug GH-20217 (ReflectionClass::isIterable() incorrectly returns true

View File

@@ -1828,7 +1828,7 @@ PHP_METHOD(Phar, buildFromIterator)
zend_string *base = ZSTR_EMPTY_ALLOC();
struct _phar_t pass;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "O|S!", &obj, zend_ce_traversable, &base) == FAILURE) {
if (zend_parse_parameters(ZEND_NUM_ARGS(), "O|P!", &obj, zend_ce_traversable, &base) == FAILURE) {
RETURN_THROWS();
}