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