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
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
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

Add a Patch

Pull Requests

Add a Pull Request

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-2024 The PHP Group
All rights reserved.
Last updated: Sat May 18 23:01:31 2024 UTC