Browse Source

Fixed bug #51171 (curl_setopt() doesn't output any errors or warnings when an invalid option is provided)

experimental/the_5_4_that_isnt_5_4
Ilia Alshanetsky 17 years ago
parent
commit
772a84d5b9
  1. 2
      NEWS
  2. 5
      ext/curl/interface.c

2
NEWS

@ -6,6 +6,8 @@ PHP NEWS
- Added stream filter support to mcrypt extension (ported from
mcrypt_filter). (Stas)
- Fixed bug #51171 (curl_setopt() doesn't output any errors or warnings when
an invalid option is provided). (Ilia)
?? ??? 20??, PHP 5.3.2
- Upgraded bundled sqlite to version 3.6.22. (Ilia)

5
ext/curl/interface.c

@ -2095,6 +2095,11 @@ PHP_FUNCTION(curl_setopt)
ZEND_FETCH_RESOURCE(ch, php_curl *, &zid, -1, le_curl_name, le_curl);
if (options <= 0) {
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid curl configuration option");
RETURN_FALSE;
}
if (!_php_curl_setopt(ch, options, zvalue, return_value TSRMLS_CC)) {
RETURN_TRUE;
} else {

Loading…
Cancel
Save