diff --git a/htdocs/core/lib/geturl.lib.php b/htdocs/core/lib/geturl.lib.php index 81ff51f00c7..0d729e6c762 100644 --- a/htdocs/core/lib/geturl.lib.php +++ b/htdocs/core/lib/geturl.lib.php @@ -217,8 +217,10 @@ function getURLContent($url, $postorget = 'GET', $param = '', $followlocation = break; } - // Set CURLOPT_CONNECT_TO so curl will not try another resolution that may give a different result - curl_setopt($ch, CURLOPT_CONNECT_TO, $iptocheck); + // Set CURLOPT_CONNECT_TO so curl will not try another resolution that may give a different result. Possible only on PHP v7+ + if (defined('CURLOPT_CONNECT_TO')) { + curl_setopt($ch, CURLOPT_CONNECT_TO, $iptocheck); + } } // Getting response from server