We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent fe85a80 commit 0274f6eCopy full SHA for 0274f6e
docker/ui.php
@@ -14,7 +14,12 @@ function I(i){return document.getElementById(i);}
14
if($mode=="standalone" || $mode=="backend"){ ?>
15
var SPEEDTEST_SERVERS=[];
16
<?php } elseif ($mode=="dual") {
17
- $servers = json_decode(file_get_contents('/servers.json'), true);
+ $jsonContent = @file_get_contents('/servers.json');
18
+ if ($jsonContent === false) {
19
+ $servers = [];
20
+ } else {
21
+ $servers = json_decode($jsonContent, true) ?: [];
22
+ }
23
24
// find out my own URL
25
$protocol = (!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off' || $_SERVER['SERVER_PORT'] == 443) ? "https://" : "http://";
0 commit comments