php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #59266 http_post_data parameter documentation wrong, but better
Submitted: 2010-06-16 14:51 UTC Modified: 2012-01-09 23:47 UTC
From: byoung at bigbluehat dot com Assigned: vrana (profile)
Status: Closed Package: pecl_http (PECL)
PHP Version: 5.3.2 OS: Mac OS X 10.6.3
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: byoung at bigbluehat dot com
New email:
PHP Version: OS:

 

 [2010-06-16 14:51 UTC] byoung at bigbluehat dot com
Description:
------------
According to the http_post_data documentation the second parameter is optional:
<code>
string http_post_data(string $url [, string $data [, array $options [, array &$info ]]])
</code>

However, when you try http_post_data('http://...'); this error is returned:
"expects at least 2 parameters, 1 given"

It would be great if the code were changed to match the documentation, in that there are times when POST-ing an empty body could be valid (requesting a "ticket" to later PUT to, etc).

Please consider the making the library match the documentation.

Thanks.



Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2012-01-09 23:47 UTC] frozenfire@php.net
-Status: Open +Status: Closed -Assigned To: +Assigned To: vrana
 [2012-01-09 23:47 UTC] frozenfire@php.net
Fixed with revision 308225 by vrana.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Dec 03 02:01:28 2024 UTC