php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #52097 http_post_data parameter documentation wrong, but better
Submitted: 2010-06-16 16:09 UTC Modified: 2010-06-16 19:27 UTC
Votes:2
Avg. Score:3.5 ± 0.5
Reproduced:1 of 1 (100.0%)
Same Version:0 (0.0%)
Same OS:1 (100.0%)
From: byoung at bigbluehat dot com Assigned:
Status: Not a bug Package: HTTP related
PHP Version: 5.3.2 OS: Mac OS X 10.6.3
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem:
22 + 16 = ?
Subscribe to this entry?

 
 [2010-06-16 16:09 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

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2010-06-16 19:20 UTC] johannes@php.net
-Status: Open +Status: Bogus
 [2010-06-16 19:20 UTC] johannes@php.net
Please report bugs&feature requests about the PECL http extension on http://pecl.php.net/pecl_http
 [2010-06-16 19:27 UTC] byoung at bigbluehat dot com
Please consider changing the "Report a problem" link on PECL extension documentation to point to the specific modules bug reporting section.

In this case: http://pecl.php.net/bugs/report.php?package=pecl_http

Thanks.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Wed Apr 24 11:01:30 2024 UTC