summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorXinchen Hui <laruence@gmail.com>2018-06-17 11:39:08 +0800
committerXinchen Hui <laruence@gmail.com>2018-06-17 11:39:08 +0800
commit77e632d04fb3246b6f381aec008fb80cebee4450 (patch)
tree912d9aa23ea1654089ac36eba127f089052c564c
parentbe49d61b19cea80ccc76e82f8faf2b2a640b658c (diff)
downloadphp-git-77e632d04fb3246b6f381aec008fb80cebee4450.tar.gz
only warning when the flag is true
-rw-r--r--ext/curl/interface.c2
1 files changed, 1 insertions, 1 deletions
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;
}