Doc #77500 [NEW]: ZipArchive::getFromName works with path, not just name

From: Date: Tue, 22 Jan 2019 16:14:39 +0000
Subject: Doc #77500 [NEW]: ZipArchive::getFromName works with path, not just name
Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-16358@lists.php.net to get a copy of this message
From: jave dot web at seznam dot cz Operating system: PHP version: Irrelevant Package: Zip Related Bug Type: Documentation Problem Bug description:ZipArchive::getFromName works with path, not just name Description: ------------ Documentation for ZipArchive::getFromName is misleading. The first parameter is actually a relative (to root of the archive) path, docs say "Name" which can falsely imply file would be found just by its filename, which doesn't happen when it is inside a directory. To get to a deeper file, you must specify the path like: $zip->getFromName('subFolderTest/test.txt'); --- From manual page: https://php.net/ziparchive.getfromname --- Test script: --------------- //considering archive structure //subFolderTest (d) // - test.txt (f) // - test2.txt (f) $zip->getFromName('test.txt'); //this will not find anything $zip->getFromName('subFolderTest/test.txt'); //this will find the file -- Edit bug report at https://bugs.php.net/bug.php?id=77500&edit=1 -- Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=77500&r=trysnapshot54 Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=77500&r=trysnapshot55 Try a snapshot (trunk): https://bugs.php.net/fix.php?id=77500&r=trysnapshottrunk Fixed in SVN: https://bugs.php.net/fix.php?id=77500&r=fixed Fixed in release: https://bugs.php.net/fix.php?id=77500&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=77500&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=77500&r=needscript Try newer version: https://bugs.php.net/fix.php?id=77500&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=77500&r=support Expected behavior: https://bugs.php.net/fix.php?id=77500&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=77500&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=77500&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=77500&r=globals PHP 4 support discontinued: https://bugs.php.net/fix.php?id=77500&r=php4 Daylight Savings: https://bugs.php.net/fix.php?id=77500&r=dst IIS Stability: https://bugs.php.net/fix.php?id=77500&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=77500&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=77500&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=77500&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=77500&r=mysqlcfg

« previous php.doc.bugs (#16358) next »