#39573 [NEW]: Documentation wrong on ZipArchive:renameName
| From: | damon dot dean at revcube dot com | Date: | Tue, 21 Nov 2006 22:13:31 +0000 |
| Subject: | #39573 [NEW]: Documentation wrong on ZipArchive:renameName | ||
| Groups: | php.doc | ||
| Request: | Send a blank email to phpdoc+get-969374440@lists.php.net to get a copy of this message | ||
From: damon dot dean at revcube dot com
Operating system: Mac OS X
PHP version: Irrelevant
PHP Bug Type: Documentation problem
Bug description: Documentation wrong on ZipArchive:renameName
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;
}
?>
--
Edit bug report at http://bugs.php.net/?id=39573&edit=1
--
Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=39573&r=trysnapshot44
Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=39573&r=trysnapshot52
Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=39573&r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=39573&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=39573&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=39573&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=39573&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=39573&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=39573&r=support
Expected behavior: http://bugs.php.net/fix.php?id=39573&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=39573&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=39573&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=39573&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=39573&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=39573&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=39573&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=39573&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=39573&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=39573&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=39573&r=mysqlcfg