fixed error when account without DHCP statements was loaded

This commit is contained in:
Roland Gruber 2008-12-29 16:59:54 +00:00
parent 6d4eb8b4d9
commit 0f91268ec1
1 changed files with 7 additions and 6 deletions

View File

@ -209,6 +209,7 @@ class ddns extends baseModule {
$attrTmp = $attr; $attrTmp = $attr;
unset($attr); unset($attr);
if (array_key_exists('dhcpStatements', $attrTmp) && is_array($attrTmp['dhcpStatements'])) {
foreach($attrTmp['dhcpStatements'] AS $value) { foreach($attrTmp['dhcpStatements'] AS $value) {
$ex = explode(" ", $value); $ex = explode(" ", $value);
@ -216,10 +217,10 @@ class ddns extends baseModule {
$attr['dhcpStatements'][] = $value; $attr['dhcpStatements'][] = $value;
} }
} }
}
unset($attrTmp); unset($attrTmp);
// Alles, was über dem ArrayIndex 3 liegt, wird gelöscht:
if (!is_array($attr)) $attr = array(); if (!is_array($attr)) $attr = array();
$this->orig = $attr; $this->orig = $attr;