#44519 [Opn->Csd]: curl documentation lists CURLOPT_POSTFIELDS as string, should be mixed

From: Date: Wed, 01 Oct 2008 08:37:33 +0000
Subject: #44519 [Opn->Csd]: curl documentation lists CURLOPT_POSTFIELDS as string, should be mixed
References: 1  Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-1180@lists.php.net to get a copy of this message
ID: 44519 Updated by: kalle@php.net Reported By: stefan dot nolde at lazos dot cl -Status: Open +Status: Closed Bug Type: Documentation problem Operating System: any PHP Version: Irrelevant -Assigned To: +Assigned To: kalle New Comment: This bug has been fixed in the documentation's XML sources. Since the online and downloadable versions of the documentation need some time to get updated, we would like to ask you to be a bit patient. Thank you for the report, and for helping us make our documentation better. Previous Comments: ------------------------------------------------------------------------ [2008-03-24 18:33:23] stefan dot nolde at lazos dot cl 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 this bug report at http://bugs.php.net/?id=44519&edit=1

« previous php.doc.bugs (#1180) next »