From 77e632d04fb3246b6f381aec008fb80cebee4450 Mon Sep 17 00:00:00 2001 From: Xinchen Hui Date: Sun, 17 Jun 2018 11:39:08 +0800 Subject: [PATCH] only warning when the flag is true --- ext/curl/interface.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ext/curl/interface.c b/ext/curl/interface.c index d197d5cd96..c63bad6e8b 100644 --- a/ext/curl/interface.c +++ b/ext/curl/interface.c @@ -2196,7 +2196,7 @@ static int _php_curl_setopt(php_curl *ch, zend_long option, zval *zvalue) /* {{{ } #endif # if defined(ZTS) - if (option == CURLOPT_DNS_USE_GLOBAL_CACHE) { + if (option == CURLOPT_DNS_USE_GLOBAL_CACHE && lval) { php_error_docref(NULL, E_WARNING, "CURLOPT_DNS_USE_GLOBAL_CACHE cannot be activated when thread safety is enabled"); return 1; } -- 2.40.0