Doc #53166 [Opn]: ZipArchive::addFile() is missing parameters in docs
| From: | znarkus at gmail dot com | Date: | Tue, 26 Oct 2010 14:51:53 +0000 |
| Subject: | Doc #53166 [Opn]: ZipArchive::addFile() is missing parameters in docs | ||
| References: | 1 | Groups: | php.doc.bugs |
| Request: | Send a blank email to doc-bugs+get-5416@lists.php.net to get a copy of this message | ||
Edit report at http://bugs.php.net/bug.php?id=53166&edit=1
ID: 53166
User updated by: znarkus at gmail dot com
Reported by: znarkus at gmail dot com
Summary: ZipArchive::addFile() is missing parameters in docs
Status: Open
Type: Documentation Problem
Package: Documentation problem
Operating System: Windows
PHP Version: 5.3.3
Block user comment: N
New Comment:
Without them, I get the following error when extending the class.
Declaration of ZipArchiveImproved::addFile() should be compatible with
that of ZipArchive::addFile()
ZipArchiveImproved is my custom class, and definition of addFile is as
follows, which doesn't work.
public function addFile( $fileName, $localname = '')
Previous Comments:
------------------------------------------------------------------------
[2010-10-26 14:47:06] rquadling@php.net
Interesting. Yes, the prototype could look like that, but the additional
parameters would have no impact.
In both the addFile() and the addGlob() methods, the call to
php_zip_add_file
doesn't passes 0 for both the start and length parameters.
I'd not change the documentation to match these useless parameters.
Unless this bug is really that the values SHOULD be passed?
------------------------------------------------------------------------
[2010-10-26 14:35:10] znarkus at gmail dot com
On this URL: http://se.php.net/manual/en/function.ziparchive-addfile.php
------------------------------------------------------------------------
[2010-10-26 14:34:15] znarkus at gmail dot com
Description:
------------
If I understood the php_zip.c file, the declaration should be
public function addFile($fileName, $localname = '', $start = null, $end
= null)
Using that declaration with PHP 5.3.3, I could extend ZipArchive which
rendered errors otherwise.
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/bug.php?id=53166&edit=1