fixes warning on /var/www/include/functions.php on line 48

This commit is contained in:
dg9vh 2017-01-10 20:09:03 +00:00
parent 010d885f7b
commit 99687f6776

View file

@ -45,10 +45,15 @@ function setDMRNetwork($network) {
} }
function getDMRNetwork() { function getDMRNetwork() {
$fp = fopen('config/DMRNetwork.txt', 'r'); if (file_exists('config/DMRNetwork.txt')) {
$network = fread($fp, filesize("config/DMRNetwork.txt")); $fp = fopen('config/DMRNetwork.txt', 'r');
fclose($fp); $network = fread($fp, filesize("config/DMRNetwork.txt"));
return $network; fclose($fp);
return $network;
} else {
return "";
}
} }
function getDMRNetwork2() { function getDMRNetwork2() {