fixed error when account without DHCP statements was loaded
This commit is contained in:
parent
6d4eb8b4d9
commit
0f91268ec1
|
@ -209,17 +209,18 @@ class ddns extends baseModule {
|
||||||
$attrTmp = $attr;
|
$attrTmp = $attr;
|
||||||
|
|
||||||
unset($attr);
|
unset($attr);
|
||||||
foreach($attrTmp['dhcpStatements'] AS $value) {
|
if (array_key_exists('dhcpStatements', $attrTmp) && is_array($attrTmp['dhcpStatements'])) {
|
||||||
$ex = explode(" ", $value);
|
foreach($attrTmp['dhcpStatements'] AS $value) {
|
||||||
|
$ex = explode(" ", $value);
|
||||||
if ($ex[0] == 'zone') {
|
|
||||||
$attr['dhcpStatements'][] = $value;
|
if ($ex[0] == 'zone') {
|
||||||
|
$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;
|
||||||
|
|
Loading…
Reference in New Issue