forked from php/php-src
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support for curl_strerror and curl_multi_strerror
Add the support for both curl_strerror and curl_multi_strerror. Those function will return a string describing the error code passed in the argument errornum
- Loading branch information
Showing
5 changed files
with
106 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
--TEST-- | ||
curl_multi_strerror basic test | ||
--SKIPIF-- | ||
if (!extension_loaded("curl")) { | ||
exit("skip curl extension not loaded"); | ||
} | ||
$curl_version = curl_version(); | ||
if ($curl_version['version_number'] < 0x070c00) { | ||
exit("skip: test works only with curl >= 7.12.0"); | ||
} | ||
--FILE-- | ||
<?php | ||
|
||
var_dump(curl_multi_strerror(CURLM_OK)); | ||
var_dump(curl_multi_strerror(CURLM_BAD_HANDLE)); | ||
|
||
?> | ||
--EXPECTF-- | ||
string(8) "No error" | ||
string(20) "Invalid multi handle" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
--TEST-- | ||
curl_strerror basic test | ||
--SKIPIF-- | ||
if (!extension_loaded("curl")) { | ||
exit("skip curl extension not loaded"); | ||
} | ||
$curl_version = curl_version(); | ||
if ($curl_version['version_number'] < 0x070c00) { | ||
exit("skip: test works only with curl >= 7.12.0"); | ||
} | ||
--FILE-- | ||
<?php | ||
|
||
var_dump(curl_strerror(CURLE_OK)); | ||
var_dump(curl_strerror(CURLE_UNSUPPORTED_PROTOCOL)); | ||
var_dump(curl_strerror(-1)); | ||
|
||
?> | ||
--EXPECTF-- | ||
string(8) "No error" | ||
string(20) "Unsupported protocol" | ||
string(13) "Unknown error" |