php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #39573 Documentation wrong on ZipArchive:renameName
Submitted: 2006-11-21 22:13 UTC Modified: 2006-12-02 07:23 UTC
From: damon dot dean at revcube dot com Assigned:
Status: Closed Package: Documentation problem
PHP Version: Irrelevant OS: Mac OS X
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 you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: damon dot dean at revcube dot com
New email:
PHP Version: OS:

 

 [2006-11-21 22:13 UTC] damon dot dean at revcube dot com
Description:
------------
This should be a quickie. In example 1 for 
ZipArchive::renameName, instead of specifying $zip->renameName 
in the code, you use $zip->renameIndex, which will obviously 
cause an error. 

Reproduce code:
---------------
Here's what you have:
<?php
$zip = new ZipArchive;
$res = $zip->open('test.zip')
if ($res === TRUE) {
   $zip->renameIndex('currentname.txt','newname.txt');
   $zip->close();
} else {
   echo 'failed, code:' . $res;
}
?>

Should be

<?php
$zip = new ZipArchive;
$res = $zip->open('test.zip')
if ($res === TRUE) {
   $zip->renameName('currentname.txt','newname.txt');
   $zip->close();
} else {
   echo 'failed, code:' . $res;
}
?>


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2006-12-02 07:23 UTC] bjori@php.net
This bug has been fixed in the documentation's XML sources. Since the
online and downloadable versions of the documentation need some time
to get updated, we would like to ask you to be a bit patient.

Thank you for the report, and for helping us make our documentation better.

Thanks
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Wed Jul 02 01:01:34 2025 UTC