From f6899088483b51bb702decc5d50f2bb41ed44cd6 Mon Sep 17 00:00:00 2001 From: Matt Pass Date: Fri, 4 May 2018 17:47:51 +0100 Subject: [PATCH] Extra fallback to open file --- lib/settings-common.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/settings-common.php b/lib/settings-common.php index a1ec95e..00b7512 100644 --- a/lib/settings-common.php +++ b/lib/settings-common.php @@ -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 ); } -?> \ No newline at end of file +?>