Doc #61911 [Opn->Csd]: Other behavior than documented
| From: | krakjoe@php.net | Date: | Wed, 09 Oct 2013 06:30:18 +0000 |
| Subject: | Doc #61911 [Opn->Csd]: Other behavior than documented | ||
| References: | 1 | Groups: | php.doc.bugs |
| Request: | Send a blank email to doc-bugs+get-10453@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=61911&edit=1
ID: 61911
Updated by: krakjoe@php.net
Reported by: richard dot berger at gmx dot de
Summary: Other behavior than documented
-Status: Open
+Status: Closed
Type: Documentation Problem
Package: Documentation problem
Operating System: Debian 6.0.4, PHP 5.3.3
PHP Version: Irrelevant
-Assigned To:
+Assigned To: krakjoe
Block user comment: N
Private report: N
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:
------------------------------------------------------------------------
[2013-10-09 06:30:13] krakjoe@php.net
Automatic comment from SVN on behalf of krakjoe
Revision: http://svn.php.net/viewvc/?view=revision&revision=331739
Log: #61911 incorrect description of option constant
------------------------------------------------------------------------
[2012-05-02 18:04:18] richard dot berger at gmx dot de
Description:
------------
---
From manual page: http://www.php.net/function.curl-setopt#refsect1-function.curl-setopt-parameters
---
"CURLOPT_FAILONERROR - TRUE to fail silently if the HTTP code returned is greater than or equal
to 400. The default behavior is to return the page normally, ignoring the code."
It's the opposite, I had to set it to true, to not fail silently.
--> it must be:
"CURLOPT_FAILONERROR - TRUE to NOT fail silently if the HTTP code returned is greater than or
equal to 400. The default behavior is to return the page normally, ignoring the code."
Test script:
---------------
<?
$ch = curl_init();
//curl_setopt($ch, CURLOPT_FAILONERROR, false);
curl_setopt($ch, CURLOPT_FAILONERROR, true);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_URL, "http://some.host/non-existing-ressource/");
if (!curl_exec($ch)) {
echo "non existing resource";
}
Expected result:
----------------
No output from the echo command.
Actual result:
--------------
The echo command "non existing ressource" is executed when requesting a non existing http
ressource. According to the documentation this shouldnt be the case if CURLOPT_FAILONERROR is TRUE.
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=61911&edit=1