Skip to content

Commit f689908

Browse files
authored
Extra fallback to open file
1 parent d3df862 commit f689908

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

lib/settings-common.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,9 @@ function getData($url,$type='fopen',$dieMessage=false,$timeout=60) {
7474
if (!$data) {
7575
$data = @file_get_contents(str_replace("https:","http:",$url), false, $context);
7676
}
77-
}
77+
} elseif (file_exists($url)) {
78+
$data = file_get_contents($url);
79+
}
7880
// Return data or die with message
7981
if ($data) {
8082
return $data;
@@ -298,4 +300,4 @@ function getVersionsCount($fileLoc,$fileName) {
298300
"dateCounts" => $dateCounts
299301
);
300302
}
301-
?>
303+
?>

0 commit comments

Comments
 (0)