From 079440dc9767c9cec33f4ad9379b4538ebc5ee6a Mon Sep 17 00:00:00 2001 From: Roland Gruber Date: Sun, 4 Oct 2009 18:11:50 +0000 Subject: [PATCH] PHP 5.3 compatibility --- lam/lib/types/dhcp.inc | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/lam/lib/types/dhcp.inc b/lam/lib/types/dhcp.inc index 2f3b1bcd..e9d49857 100644 --- a/lam/lib/types/dhcp.inc +++ b/lam/lib/types/dhcp.inc @@ -147,14 +147,16 @@ class lamDHCPList extends lamList { // Now list all fixed_ips: echo ""; $this->fixed_ips = array(); - foreach($get AS $id=>$arr) { - if (is_numeric($id)) { - echo ""; - echo ""; - echo ""; - echo ""; - echo ""; - } + if (isset($get)) { + foreach($get AS $id=>$arr) { + if (is_numeric($id)) { + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + } + } } echo "
".array_pop(explode(" ",$get[$id]['dhcpstatements'][0]))."".array_pop(explode(" ",$get[$id]['dhcphwaddress'][0]))."".$get[$id]['cn'][0]."
".array_pop(explode(" ",$get[$id]['dhcpstatements'][0]))."".array_pop(explode(" ",$get[$id]['dhcphwaddress'][0]))."".$get[$id]['cn'][0]."
"; }