diff options
-rw-r--r-- | etc/inc/system.inc | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/etc/inc/system.inc b/etc/inc/system.inc index b902761..8ce0fa2 100644 --- a/etc/inc/system.inc +++ b/etc/inc/system.inc @@ -258,6 +258,8 @@ function system_hosts_generate() { $lhosts .= "{$host['ip']} {$host['host']}.{$host['domain']} {$host['host']}\n"; else $lhosts .= "{$host['ip']} {$host['domain']}\n"; + if (!is_array($host['aliases']) || !is_array($host['aliases']['item'])) + continue; foreach ($host['aliases']['item'] as $alias) { if ($alias['host']) $lhosts .= "{$host['ip']} {$alias['host']}.{$alias['domain']} {$alias['host']}\n"; |