ignore errors parsing cfg file

This commit is contained in:
ljm42
2021-05-14 07:38:17 -07:00
parent c0ab0176f9
commit fe566a8427
3 changed files with 4 additions and 4 deletions
@@ -40,7 +40,7 @@ function upcEnv(str) {
<?
// Determine what source we should use for web components
if (file_exists('/boot/config/plugins/dynamix.my.servers/myservers.cfg')) { // context needed for the UPC ENV local check for signed out users
extract(parse_ini_file('/boot/config/plugins/dynamix.my.servers/myservers.cfg',true));
@extract(parse_ini_file('/boot/config/plugins/dynamix.my.servers/myservers.cfg',true));
}
// When signed out and there's no cookie, UPC ENV should be 'local' to avoid use of external resource. Otherwise default of 'production'.
$UPC_ENV = $_COOKIE['UPC_ENV'] ?? ((empty($remote['apikey']) || empty($var['regFILE'])) ? 'local' : 'production');
@@ -1,7 +1,7 @@
<!-- myservers2 -->
<?
if (file_exists('/boot/config/plugins/dynamix.my.servers/myservers.cfg')) {
extract(parse_ini_file('/boot/config/plugins/dynamix.my.servers/myservers.cfg',true));
@extract(parse_ini_file('/boot/config/plugins/dynamix.my.servers/myservers.cfg',true));
}
$serverstate = [
@@ -475,4 +475,4 @@
theme="<?=$display['theme']?>"
uptime="<?=1000*(time() - round(strtok(exec("cat /proc/uptime"),' ')))?>"
></unraid-user-profile>
<!-- /myservers2 -->
<!-- /myservers2 -->
+1 -1
View File
@@ -22,7 +22,7 @@ $var = (array)parse_ini_file('state/var.ini');
$license_state = strtoupper(empty($var['regCheck']) ? $var['regTy'] : $var['regCheck']);
$key_contents = str_replace(['+','/','='], ['-','_',''], trim(base64_encode(@file_get_contents($var['regFILE']))));
if (file_exists('/boot/config/plugins/dynamix.my.servers/myservers.cfg')) {
extract(parse_ini_file('/boot/config/plugins/dynamix.my.servers/myservers.cfg',true));
@extract(parse_ini_file('/boot/config/plugins/dynamix.my.servers/myservers.cfg',true));
}
$arr = [];