summaryrefslogtreecommitdiff
path: root/ext/curl
diff options
context:
space:
mode:
Diffstat (limited to 'ext/curl')
-rw-r--r--ext/curl/interface.c2
-rw-r--r--ext/curl/tests/bug68089.phpt4
2 files changed, 3 insertions, 3 deletions
diff --git a/ext/curl/interface.c b/ext/curl/interface.c
index 09e02b3ba5..150f98d46f 100644
--- a/ext/curl/interface.c
+++ b/ext/curl/interface.c
@@ -102,7 +102,7 @@ static int php_curl_option_str(php_curl *ch, zend_long option, const char *str,
CURLcode error = CURLE_OK;
if (strlen(str) != len) {
- zend_type_error("%s(): cURL option cannot contain any null-bytes", get_active_function_name());
+ zend_value_error("%s(): cURL option must not contain any null bytes", get_active_function_name());
return FAILURE;
}
diff --git a/ext/curl/tests/bug68089.phpt b/ext/curl/tests/bug68089.phpt
index 96405f9134..a4a39ec6f5 100644
--- a/ext/curl/tests/bug68089.phpt
+++ b/ext/curl/tests/bug68089.phpt
@@ -12,12 +12,12 @@ $ch = curl_init();
try {
curl_setopt($ch, CURLOPT_URL, $url);
-} catch (TypeError $exception) {
+} catch (ValueError $exception) {
echo $exception->getMessage() . "\n";
}
?>
Done
--EXPECT--
-curl_setopt(): cURL option cannot contain any null-bytes
+curl_setopt(): cURL option must not contain any null bytes
Done