1
0
mirror of https://github.com/moparisthebest/wallabag synced 2024-11-27 11:22:17 -05:00

[fix] bug fix #287: test if open_basedir & safe_mode are active to use CURLOPT_FOLLOWLOCATION

This commit is contained in:
Nicolas Lœuillet 2013-11-13 15:17:34 +01:00
parent 5862c872c6
commit f2d3ee98a6

View File

@ -133,7 +133,9 @@ class Tools
$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, $url);
curl_setopt($curl, CURLOPT_TIMEOUT, $timeout);
curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
if (!ini_get('open_basedir') && !ini_get('safe_mode')) {
curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
}
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
curl_setopt($curl, CURLOPT_HEADER, false);