Commit 8053311b authored by Bas de Nooijer's avatar Bas de Nooijer Committed by GitHub

Merge pull request #493 from ejn/carefulIniGet

Check ini_get is not disabled before using it
parents 37c822d6 3c7677d5
......@@ -116,7 +116,7 @@ class Curl extends Configurable implements AdapterInterface
$handler = curl_init();
curl_setopt($handler, CURLOPT_URL, $uri);
curl_setopt($handler, CURLOPT_RETURNTRANSFER, true);
if (!ini_get('open_basedir')) {
if (!(function_exists('ini_get') && ini_get('open_basedir'))) {
curl_setopt($handler, CURLOPT_FOLLOWLOCATION, true);
}
curl_setopt($handler, CURLOPT_TIMEOUT, $options['timeout']);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment