Bug #15947 Updated: It's code wrong or document wrong about fgets
| From: | derick@php.net | Date: | Fri, 08 Mar 2002 07:39:30 +0000 |
| Subject: | Bug #15947 Updated: It's code wrong or document wrong about fgets | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-1989@lists.php.net to get a copy of this message | ||
ID: 15947
Updated by: derick@php.net
-Summary: It's code wrong or document wrong about fgets
Reported By: yorgo@163.net
Status: Open
Bug Type: Filesystem function related
Operating System: linux
PHP Version: 4.1.2
New Comment:
Documentation is correct here, but the 2nd parameter is only optional
in php 4.2.0 and higher (not released yet).
Derick
Previous Comments:
------------------------------------------------------------------------
[2002-03-08 01:29:23] yorgo@163.net
On fgets() document is write
string fgets ( int fp [, int length])
bug is you just write php code like
$string = fget($fp);
it will print out some warn info about "Wrong parameter count".
when I check the source code on fgets(), it writed
if (ARG_COUNT(ht) != 2 || zend_get_parameters_ex(2, &arg1, &arg2) ==
FAILURE) {
WRONG_PARAM_COUNT;
}
I think it must not ARG_COUNT(ht) != 2
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=15947&edit=1