mirror of
https://github.com/php/php-src.git
synced 2024-09-22 18:37:25 +00:00
7426e3b6a1
libcurl 7.29.0 has been released almost eight years ago, so this version is supposed to be available practically everywhere. This bump also allows us to get rid of quite some conditional code and tests catering to very old libcurl versions.
31 lines
883 B
PHP
31 lines
883 B
PHP
--TEST--
|
|
Bug #63795 (CURL >= 7.28.0 no longer support value 1 for CURLOPT_SSL_VERIFYHOST)
|
|
--SKIPIF--
|
|
<?php
|
|
if (!extension_loaded("curl")) {
|
|
exit("skip curl extension not loaded");
|
|
}
|
|
?>
|
|
--FILE--
|
|
<?php
|
|
$ch = curl_init();
|
|
var_dump(curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false));
|
|
/* Case that should throw an error */
|
|
var_dump(curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, true));
|
|
var_dump(curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0));
|
|
var_dump(curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 1));
|
|
var_dump(curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 2));
|
|
|
|
curl_close($ch);
|
|
?>
|
|
--EXPECTF--
|
|
bool(true)
|
|
|
|
Notice: curl_setopt(): CURLOPT_SSL_VERIFYHOST no longer accepts the value 1, value 2 will be used instead in %s on line %d
|
|
bool(true)
|
|
bool(true)
|
|
|
|
Notice: curl_setopt(): CURLOPT_SSL_VERIFYHOST no longer accepts the value 1, value 2 will be used instead in %s on line %d
|
|
bool(true)
|
|
bool(true)
|