From 4a8ff20ba0e1e8dc8c8ce15943f08aca6172a397 Mon Sep 17 00:00:00 2001 From: bergware Date: Tue, 11 Mar 2025 09:30:33 +0100 Subject: [PATCH] wlan0: prevent read error when port status is unavailable --- emhttp/plugins/dynamix/nchan/wlan0 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/emhttp/plugins/dynamix/nchan/wlan0 b/emhttp/plugins/dynamix/nchan/wlan0 index 5ec3e1b08..b72002f32 100755 --- a/emhttp/plugins/dynamix/nchan/wlan0 +++ b/emhttp/plugins/dynamix/nchan/wlan0 @@ -53,7 +53,7 @@ while (true) { $locale_init = _var($display,'locale'); update_translation($locale_init); } - if (is_readable($ini) && is_readable($wlan0)) { + if (is_readable($ini) && file_exists($wlan0)) { $wifi = parse_ini_file($ini); $up = file_get_contents($wlan0)==1; $alive = $up ? exec("iw wlan0 link 2>/dev/null | grep -Pom1 'SSID: \K.+'") : '';