Extra fallback to open file

This commit is contained in:
Matt Pass
2018-05-04 17:47:51 +01:00
committed by GitHub
parent d3df8621b8
commit f689908848

View File

@@ -74,7 +74,9 @@ function getData($url,$type='fopen',$dieMessage=false,$timeout=60) {
if (!$data) {
$data = @file_get_contents(str_replace("https:","http:",$url), false, $context);
}
}
} elseif (file_exists($url)) {
$data = file_get_contents($url);
}
// Return data or die with message
if ($data) {
return $data;
@@ -298,4 +300,4 @@ function getVersionsCount($fileLoc,$fileName) {
"dateCounts" => $dateCounts
);
}
?>
?>