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
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem:
6 + 42 = ?
Subscribe to this entry?

 
 [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: Thu Dec 05 16:01:30 2024 UTC