ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> phpdoc
phpdoc
[PHP-DOC] #39573 [NEW]: Documentation wrong on ZipArchive:renameName
by Damon Dot Dean At Revcube Dot Com other posts by this author
Nov 21 2006 2:13PM messages near this date
[PHP-DOC] cvs: phpdoc /en/reference/zip/functions ziparchive-addfile.xml | [PHP-DOC] Proposal to remove void from protos
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

Privacy Policy | Email Opt-out | Feedback | Syndication
© 2004 ActiveState, a division of Sophos All rights reserved