#44519 [NEW]: curl documentation lists CURLOPT_POSTFIELDS as string, should be mixed
| From: | stefan dot nolde at lazos dot cl | Date: | Mon, 24 Mar 2008 18:33:24 +0000 |
| Subject: | #44519 [NEW]: curl documentation lists CURLOPT_POSTFIELDS as string, should be mixed | ||
| Groups: | php.doc.bugs | ||
| Request: | Send a blank email to doc-bugs+get-625@lists.php.net to get a copy of this message | ||
From: stefan dot nolde at lazos dot cl
Operating system: any
PHP version: Irrelevant
PHP Bug Type: Documentation problem
Bug description: curl documentation lists CURLOPT_POSTFIELDS as string, should be mixed
Description:
------------
The documentation about curl_setopt lists the CURLOPT_POSTFIELDS parameter
under "should be string".
The parameter can be string OR array though, in case of file uploads it
saves a lot of headaches if it is an array, plus it removes the necessity
of urlescaping the post data.
Best practice would be to list it as both string and array, maybe with a
hint like:
CURLOPT_POSTFIELDS may be passed as a urlencoded string in the form
"field1=data1&field2=data2..." or as an array with the fieldname as key and
the field data as value.
--
Edit bug report at http://bugs.php.net/?id=44519&edit=1
--
Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=44519&r=trysnapshot52
Try a CVS snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=44519&r=trysnapshot53
Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=44519&r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=44519&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=44519&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=44519&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=44519&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=44519&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=44519&r=support
Expected behavior: http://bugs.php.net/fix.php?id=44519&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=44519&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=44519&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=44519&r=globals
PHP 4 support discontinued: http://bugs.php.net/fix.php?id=44519&r=php4
Daylight Savings: http://bugs.php.net/fix.php?id=44519&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=44519&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=44519&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=44519&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=44519&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=44519&r=mysqlcfg