fixed config call
This commit is contained in:
@@ -170,8 +170,7 @@ function pull_mac_list(): array {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
function read_config_json_file(string $path): array {
|
function read_config_json_file($path){
|
||||||
global $COFNIG_PATH;
|
|
||||||
if (!is_file($path)) {
|
if (!is_file($path)) {
|
||||||
throw new RuntimeException("Config file not found: {$path}");
|
throw new RuntimeException("Config file not found: {$path}");
|
||||||
}
|
}
|
||||||
@@ -211,8 +210,9 @@ function read_config_json($key) {
|
|||||||
return $items;
|
return $items;
|
||||||
}
|
}
|
||||||
|
|
||||||
function read_config_json_string(array $config, string $key): string {
|
function read_config_json_string($key) {
|
||||||
$value = $config[$key] ?? '';
|
global $CONFIG;
|
||||||
|
$value = $CONFIG[$key] ?? '';
|
||||||
return strtolower(trim((string)$value));
|
return strtolower(trim((string)$value));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user