|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2018-06-16 08:15 UTC] maikuolan at gmail dot com
[2018-08-20 13:48 UTC] cmb@php.net
-Status: Open
+Status: Duplicate
-Assigned To:
+Assigned To: cmb
[2018-08-20 13:48 UTC] cmb@php.net
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sun Nov 02 18:00:01 2025 UTC |
Description: ------------ Attempting to access extensionless ZIP archives using the `phar://` wrapper results in errors. Examples (assumes the file being read is an arbitrary ZIP archive containing one or more files): This: ``` %PATH%>php.exe -r "$foo=scandir('phar://x:/xxx.xxx');var_dump($foo); ``` ..generates an array whereby elements represent the files contained by the archive (expected). Whereas this: ``` %PATH%>php.exe -r "$foo=scandir('phar://x:/xxx');var_dump($foo); ``` ..generates this (not expected): ``` PHP Warning: scandir(phar://x:/xxx): failed to open dir: phar error: no directory in "phar://x:/xxx", must have at least phar://x:/xxx/ for root directory (always use full path to a new phar) phar url "phar://x:/xxx" is unknown in Command line code on line 1 PHP Warning: scandir(): (errno 9): Bad file descriptor in Command line code on line 1 bool(false) ``` Bug discovered via: https://github.com/phpMussel/phpMussel/issues/155 Reproduced against latest releases on all currently supported branches (5.6, 7.0, 7.1, 7.2). Not tested against any older versions or unsupported branches.