php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #15079 Wrong function socket_recv
Submitted: 2002-01-17 02:54 UTC Modified: 2002-01-17 03:28 UTC
From: warlock at zine dot ru Assigned:
Status: Closed Package: Sockets related
PHP Version: 4.1.1 OS: FreeBSD 4.3-RELEASE
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: warlock at zine dot ru
New email:
PHP Version: OS:

 

 [2002-01-17 02:54 UTC] warlock at zine dot ru
Code: $buf=socket_recv($d->descriptor, 1024, $flags);
Warning:  socket_recv() expects exactly 2 parameters, 3 given in ...

Code: $buf=socket_recv($d->descriptor, 1024);
Warning:  socket_recv() expects parameter 2 to be resource, integer given in ...

Help for socket_recv: mixed socket_recv (resource socket, int len, int flags);


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-01-17 03:28 UTC] mfischer@php.net
Unfortunately a bug slipped it and it is fixed in CVS already. But you can easily fix it yourself by changing line 1300 in sockets.c from

  if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rr", &arg1, &len, &flags) == FAILURE)

to
  if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rll", &arg1, &len, &flags) == FAILURE)
 [2002-01-17 03:28 UTC] mfischer@php.net
The file is in php-4.1.1/ext/sockets/ .
 
PHP Copyright © 2001-2022 The PHP Group
All rights reserved.
Last updated: Fri Jul 01 11:05:45 2022 UTC