Merge pull request #9 from foaly-nr1/patch-1

check if open_basedir is set before setting CURLOPT_FOLLOWLOCATION.
master
Morten Fangel 2012-01-18 00:27:09 -08:00
commit dc4eb8c80d
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);