Skip to content

Commit 9ab800e

Browse files
committed
Mark Phar::buildFromIterator() base directory argument as a path
This is like buildFromDirectory() which does it right. Closes phpGH-20892.
1 parent 2813f62 commit 9ab800e

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

NEWS

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,8 @@ PHP NEWS
5454
ignored. (ndossche)
5555
. Support overridden methods in SplFileInfo for getMTime() and getPathname()
5656
when building a phar. (ndossche)
57+
. Mark Phar::buildFromIterator() base directory argument as a path.
58+
(ndossche)
5759

5860
- Reflection:
5961
. Fixed bug GH-20217 (ReflectionClass::isIterable() incorrectly returns true

ext/phar/phar_object.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1828,7 +1828,7 @@ PHP_METHOD(Phar, buildFromIterator)
18281828
zend_string *base = ZSTR_EMPTY_ALLOC();
18291829
struct _phar_t pass;
18301830

1831-
if (zend_parse_parameters(ZEND_NUM_ARGS(), "O|S!", &obj, zend_ce_traversable, &base) == FAILURE) {
1831+
if (zend_parse_parameters(ZEND_NUM_ARGS(), "O|P!", &obj, zend_ce_traversable, &base) == FAILURE) {
18321832
RETURN_THROWS();
18331833
}
18341834

0 commit comments

Comments
 (0)