Doc #80159 [Opn->Nab]: CURLOPT_PRIVATE does not accept array

From: Date: Tue, 29 Sep 2020 00:26:13 +0000
Subject: Doc #80159 [Opn->Nab]: CURLOPT_PRIVATE does not accept array
References: 1  Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-17921@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=80159&edit=1 ID: 80159 Updated by: danack@php.net Reported by: divinity76 at gmail dot com Summary: CURLOPT_PRIVATE does not accept array -Status: Open +Status: Not a bug Type: Documentation Problem Package: *Network Functions Operating System: Windows 10 x64 v1903 PHP Version: 7.3.22 Block user comment: N Private report: N New Comment: "the documentation doesn't mention any restrictions on the value that goes into CURLOPT_PRIVATE," https://www.php.net/manual/en/function.curl-setopt.php "value should be a string for the following values of the option parameter: " which includes CURLOPT_PRIVATE. Previous Comments: ------------------------------------------------------------------------ [2020-09-29 00:09:14] divinity76 at gmail dot com Description: ------------ doing php -r 'curl_setopt(curl_init(),CURLOPT_PRIVATE,array());' gives: PHP Notice: Array to string conversion in Command line code on line 1 and for that matter, trying an object gives: PHP Recoverable fatal error: Object of class stdClass could not be converted to string in Command line code on line 1 the documentation doesn't mention any restrictions on the value that goes into CURLOPT_PRIVATE, but testing suggest that it only accept strings, either it's missing documentation (i'm guessing that's the case), or a bug is preventing anything except strings from being inserted. Test script: --------------- php -r 'curl_setopt(curl_init(),CURLOPT_PRIVATE,array());' Actual result: -------------- PHP Notice: Array to string conversion in Command line code on line 1 ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=80159&edit=1

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