Skip to content

Commit a28799b

Browse files
committed
Use option name in more error messages
1 parent 7f8f99e commit a28799b

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

ext/curl/interface.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2039,7 +2039,7 @@ static zend_result _php_curl_setopt(php_curl *ch, zend_long option, zval *zvalue
20392039
ch->handlers.write->method = PHP_CURL_FILE;
20402040
ZVAL_COPY(&ch->handlers.write->stream, zvalue);
20412041
} else {
2042-
zend_value_error("%s(): The provided file handle must be writable", get_active_function_name());
2042+
zend_value_error("%s(): The file handle provided for CURLOPT_FILE must be writable", get_active_function_name());
20432043
return FAILURE;
20442044
}
20452045
break;
@@ -2057,7 +2057,7 @@ static zend_result _php_curl_setopt(php_curl *ch, zend_long option, zval *zvalue
20572057
ch->handlers.write_header->method = PHP_CURL_FILE;
20582058
ZVAL_COPY(&ch->handlers.write_header->stream, zvalue);
20592059
} else {
2060-
zend_value_error("%s(): The provided file handle must be writable", get_active_function_name());
2060+
zend_value_error("%s(): The file handle provided for CURLOPT_WRITEHEADER must be writable", get_active_function_name());
20612061
return FAILURE;
20622062
}
20632063
break;
@@ -2086,7 +2086,7 @@ static zend_result _php_curl_setopt(php_curl *ch, zend_long option, zval *zvalue
20862086
zval_ptr_dtor(&ch->handlers.std_err);
20872087
ZVAL_COPY(&ch->handlers.std_err, zvalue);
20882088
} else {
2089-
zend_value_error("%s(): The provided file handle must be writable", get_active_function_name());
2089+
zend_value_error("%s(): The file handle provided for CURLOPT_STDERR must be writable", get_active_function_name());
20902090
return FAILURE;
20912091
}
20922092
ZEND_FALLTHROUGH;

ext/curl/tests/bug48207.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,6 @@ is_file($tempfile) and @unlink($tempfile);
4747
isset($tempname) and is_file($tempname) and @unlink($tempname);
4848
?>
4949
--EXPECT--
50-
curl_setopt(): The provided file handle must be writable
50+
curl_setopt(): The file handle provided for CURLOPT_FILE must be writable
5151
Hello World!
5252
Hello World!

0 commit comments

Comments
 (0)