only try to set fucking cookie jar if open_basedir restriction is not in effect

This commit is contained in:
Andrew Dolgov 2013-10-23 13:34:47 +04:00
parent 1130125a3a
commit 0f6b926393

View file

@ -378,7 +378,10 @@
curl_setopt($ch, CURLOPT_USERAGENT, SELF_USER_AGENT);
curl_setopt($ch, CURLOPT_ENCODING, "");
curl_setopt($ch, CURLOPT_REFERER, $url);
curl_setopt($ch, CURLOPT_COOKIEJAR, "/dev/null");
if (!ini_get("safe_mode") && !ini_get("open_basedir")) {
curl_setopt($ch, CURLOPT_COOKIEJAR, "/dev/null");
}
if (defined('_CURL_HTTP_PROXY')) {
curl_setopt($ch, CURLOPT_PROXY, _CURL_HTTP_PROXY);