Skip to content

Commit 3ea273b

Browse files
author
florian030
committed
remoting.inc.php
1 parent 38b5ec8 commit 3ea273b

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

interface/lib/classes/remoting.inc.php

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -151,11 +151,13 @@ public function login($username, $password, $client_login = false)
151151
// get the ip for a hostname
152152
unset($allowed_ips[$i]);
153153
$temp=dns_get_record($allowed, DNS_A+DNS_AAAA);
154-
foreach($temp as $t) {
155-
if(isset($t['ip'])) $allowed_ips[] = $t['ip'];
156-
if(isset($t['ipv6'])) $allowed_ips[] = $t['ipv6'];
154+
if(is_array($temp) && !empty($temp)) {
155+
foreach($temp as $t) {
156+
if(isset($t['ip'])) $allowed_ips[] = $t['ip'];
157+
if(isset($t['ipv6'])) $allowed_ips[] = $t['ipv6'];
158+
}
159+
unset($temp);
157160
}
158-
unset($temp);
159161
}
160162
}
161163
}

0 commit comments

Comments
 (0)