|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2013-07-19 07:20 UTC] ab@php.net
-Status: Open
+Status: Feedback
[2013-07-19 07:20 UTC] ab@php.net
[2013-07-19 22:41 UTC] crayonviolent at phpfreaks dot com
-Status: Feedback
+Status: Open
[2013-07-19 22:41 UTC] crayonviolent at phpfreaks dot com
[2013-07-22 07:34 UTC] ab@php.net
[2013-07-22 07:39 UTC] ab@php.net
-Status: Open
+Status: Wont fix
[2013-07-22 13:25 UTC] crayonviolent at phpfreaks dot com
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Fri Oct 24 07:00:01 2025 UTC |
Description: ------------ From the code below, if $file_name is a valid file found within $zip_file, the contents are echo'd just fine. However, if the $file_name is not found, $fp returns false and getStatusString() is echo'd. The problem is that it is echoing "No error". Shouldn't it be returning "No such file" (ER_NOENT) ? Maybe this is actually a bug with ZipArchive::getStream or a combo of both? Test script: --------------- /**** begin code ****/ $zip_file='someZip.zip'; $file_name='someFile.txt'; $z = new ZipArchive(); if ($z->open($zip_file) !== true) { echo "File not found."; return false; } $fp = $z->getStream($file_name); if (!$fp) { echo $z->getStatusString(); } else { fpassthru($fp); } /***** end code ******/