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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Password:
Status:
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

Add a Patch

Pull Requests

Add a Pull Request

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: Tue Apr 23 15:01:32 2024 UTC