diff options
author | Andrew Dolgov <[email protected]> | 2013-10-23 13:34:47 +0400 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2013-10-23 13:34:47 +0400 |
commit | 0f6b926393a514e2b3f76f05ae2a0712c1df8036 (patch) | |
tree | 95e45e38017670cd23e47bb7311d619eae419d5d /include/functions.php | |
parent | 1130125a3a395ddde10870c9502077925d098365 (diff) |
only try to set fucking cookie jar if open_basedir restriction is not in effect
Diffstat (limited to 'include/functions.php')
-rw-r--r-- | include/functions.php | 5 |
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); |