#39573 [Opn->Csd]: Documentation wrong on ZipArchive:renameName

From: Date: Sat, 02 Dec 2006 07:23:30 +0000
Subject: #39573 [Opn->Csd]: Documentation wrong on ZipArchive:renameName
References: 1  Groups: php.doc 
Request: Send a blank email to phpdoc+get-969374523@lists.php.net to get a copy of this message
ID: 39573 Updated by: bjori@php.net Reported By: damon dot dean at revcube dot com -Status: Open +Status: Closed Bug Type: Documentation problem Operating System: Mac OS X PHP Version: Irrelevant New Comment: 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 Previous Comments: ------------------------------------------------------------------------ [2006-11-21 22:13:31] 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; } ?> ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=39573&edit=1

« previous php.doc (#969374523) next »