summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2013-10-23 13:34:47 +0400
committerAndrew Dolgov <[email protected]>2013-10-23 13:34:47 +0400
commit0f6b926393a514e2b3f76f05ae2a0712c1df8036 (patch)
tree95e45e38017670cd23e47bb7311d619eae419d5d /include
parent1130125a3a395ddde10870c9502077925d098365 (diff)
only try to set fucking cookie jar if open_basedir restriction is not in effect
Diffstat (limited to 'include')
-rw-r--r--include/functions.php5
1 files changed, 4 insertions, 1 deletions
diff --git a/include/functions.php b/include/functions.php
index 7c98055a6..38ccfe8ac 100644
--- a/include/functions.php
+++ b/include/functions.php
@@ -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);