From db85e27a97dfb16e652e9d00bbc26ef677612059 Mon Sep 17 00:00:00 2001 From: Stephen Soltesz Date: Mon, 5 Nov 2007 22:33:08 +0000 Subject: [PATCH] Ignore empty 'portstatus' dicts. This just means the ports are down. --- www/printbadpcus.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/www/printbadpcus.php b/www/printbadpcus.php index fb86fa3..a57bf90 100644 --- a/www/printbadpcus.php +++ b/www/printbadpcus.php @@ -28,7 +28,7 @@ function format_ports($pcu) $str = ""; #print print_r(is_array($pcu)) . "
"; #print print_r(array_key_exists('portstatus', $pcu)) . "
"; - if ( is_array($pcu) && array_key_exists('portstatus', $pcu) ) + if ( is_array($pcu) && array_key_exists('portstatus', $pcu) && count(array_keys($pcu['portstatus'])) > 0 ) { $portstat = $pcu['portstatus']; -- 2.47.0