Skip to content

Commit 77e632d

Browse files
committed
only warning when the flag is true
1 parent be49d61 commit 77e632d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ext/curl/interface.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2196,7 +2196,7 @@ static int _php_curl_setopt(php_curl *ch, zend_long option, zval *zvalue) /* {{{
21962196
}
21972197
#endif
21982198
# if defined(ZTS)
2199-
if (option == CURLOPT_DNS_USE_GLOBAL_CACHE) {
2199+
if (option == CURLOPT_DNS_USE_GLOBAL_CACHE && lval) {
22002200
php_error_docref(NULL, E_WARNING, "CURLOPT_DNS_USE_GLOBAL_CACHE cannot be activated when thread safety is enabled");
22012201
return 1;
22022202
}

0 commit comments

Comments
 (0)