php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #57239 getFromIndex(0) fails, but getFromName(getNameIndex(0)) works
Submitted: 2006-09-14 11:18 UTC Modified: 2006-09-15 09:15 UTC
From: email at steffenweber dot net Assigned: pajoye (profile)
Status: Closed Package: zip (PECL)
PHP Version: 5.1.6 OS: Gentoo Linux
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: email at steffenweber dot net
New email:
PHP Version: OS:

 

 [2006-09-14 11:18 UTC] email at steffenweber dot net
Description:
------------
Calling $za->getFromIndex(0) returns false, but $za->getFromName($za->getNameIndex(0)) works perfectly fine.

I?ve experienced this with two different archives, one created myself and for example this one: http://www.konstant.de/fileadmin/templates/zipfiles/liteon/LX-2B1U_Front_Top.zip

Reproduce code:
---------------
$za = new ZipArchive();
$za->open("archive.zip");
var_dump($za->getFromIndex(0));
var_dump($za->getFromName($za->getNameIndex(0)));

Expected result:
----------------
"Contents of ZIP archive"
"Contents of ZIP archive"

Actual result:
--------------
bool(false)
"Contents of ZIP archive"

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2006-09-14 11:24 UTC] email at steffenweber dot net
Forgot to mention: I?m using ZipArchive 1.7.2.
 [2006-09-15 09:15 UTC] pierre dot php at gmail dot com
This bug has been fixed in CVS.

In case this was a documentation problem, the fix will show up at the
end of next Sunday (CET) on pecl.php.net.

In case this was a pecl.php.net website problem, the change will show
up on the website in short time.
 
Thank you for the report, and for helping us make PECL better.


 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Dec 21 11:01:30 2024 UTC