check if open_basedir is set before setting CURLOPT_FOLLOWLOCATION.

master
foaly-nr1 2012-01-17 21:03:17 +01:00
rodzic c4042c1628
commit 6e864910c0
1 zmienionych plików z 1 dodań i 1 usunięć

Wyświetl plik

@ -44,7 +44,7 @@ class SG_iCal_Parser {
$c = curl_init();
curl_setopt($c, CURLOPT_URL, $resource);
curl_setopt($c, CURLOPT_RETURNTRANSFER, true);
if( !ini_get('safe_mode') ){
if( !ini_get('safe_mode') && !ini_get('open_basedir') ){
curl_setopt($c, CURLOPT_FOLLOWLOCATION, true);
}
$content = curl_exec($c);