php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #22282 function synopsis for dba_fetch() is wrong
Submitted: 2003-02-18 14:25 UTC Modified: 2003-07-18 15:04 UTC
From: helly@php.net Assigned:
Status: Closed Package: Documentation problem
PHP Version: 4.3.0 OS: ANY
Private report: No CVE-ID: None
 [2003-02-18 14:25 UTC] helly@php.net
The documentation says both skip and handle parameter are optional, that is wrong.

string dba_fetch ( string key [, int skip, resource handle])

Instead only the skip parameter is optional. A look at the xml file snippet below shows it is correct.

<methodsynopsis>
<type>string</type><methodname>dba_fetch</methodname>
<methodparam><type>string</type><parameter>key</parameter></methodparam>
<methodparam choice="opt"><type>int</type><parameter>skip</parameter></methodparam>
<methodparam><type>resource</type><parameter>handle</parameter></methodparam>
</methodsynopsis>

Therefore the documentation should state:
string dba_fetch ( string key [, int skip], resource handle)


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2003-04-01 17:27 UTC] alindeman@php.net
If it's fixed in the XML file, the documentation probably hasn't updated (there has been some problem with that lately).   Should be fixed when documentation starts updating again...
 [2003-04-01 17:49 UTC] philip@php.net
See:
http://cvs.php.net/cvs.php/phpdoc/en/reference/dba/functions/dba-fetch.xml

Hasn't been touched in four months while the manual was last built two months ago, reopening... 

Although personally I don't understand how a middle parameter can be optional...
 [2003-04-01 18:08 UTC] alindeman@php.net
According to funcsummary.txt in phpdoc/, this is the function layout

string dba_fetch(string key, [int skip ,] int handle)
     Fetches the data associated with key

Is this possible to implement in the documentation without making the third param optional?
 [2003-04-01 19:30 UTC] philip@php.net
Currently it's not possible but really it just seems odd, optional parameters should be to the right.
 [2003-04-06 06:56 UTC] sniper@php.net
This is really a special case..if that middle option
is not used, then the function assumes that the 2nd one is the 3rd in the proto..

 [2003-07-18 15:04 UTC] philip@php.net
This is fixed in CVS by Didou and will show up when the manual is next built.

Status->closed.
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Wed Aug 13 15:00:03 2025 UTC