fixed config call

This commit is contained in:
2026-02-02 10:52:50 -06:00
parent c89e1da002
commit f96abcbb4e

View File

@@ -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));
}