xref: /PHP-8.0/ext/curl/tests/bug63795.phpt (revision 7426e3b6)
1--TEST--
2Bug #63795 (CURL >= 7.28.0 no longer support value 1 for CURLOPT_SSL_VERIFYHOST)
3--SKIPIF--
4<?php
5if (!extension_loaded("curl")) {
6        exit("skip curl extension not loaded");
7}
8?>
9--FILE--
10<?php
11$ch = curl_init();
12var_dump(curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false));
13/* Case that should throw an error */
14var_dump(curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, true));
15var_dump(curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0));
16var_dump(curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 1));
17var_dump(curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 2));
18
19curl_close($ch);
20?>
21--EXPECTF--
22bool(true)
23
24Notice: curl_setopt(): CURLOPT_SSL_VERIFYHOST no longer accepts the value 1, value 2 will be used instead in %s on line %d
25bool(true)
26bool(true)
27
28Notice: curl_setopt(): CURLOPT_SSL_VERIFYHOST no longer accepts the value 1, value 2 will be used instead in %s on line %d
29bool(true)
30bool(true)
31