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;
|
||||
|
||||
unset($attr);
|
||||
foreach($attrTmp['dhcpStatements'] AS $value) {
|
||||
$ex = explode(" ", $value);
|
||||
|
||||
if ($ex[0] == 'zone') {
|
||||
$attr['dhcpStatements'][] = $value;
|
||||
if (array_key_exists('dhcpStatements', $attrTmp) && is_array($attrTmp['dhcpStatements'])) {
|
||||
foreach($attrTmp['dhcpStatements'] AS $value) {
|
||||
$ex = explode(" ", $value);
|
||||
|
||||
if ($ex[0] == 'zone') {
|
||||
$attr['dhcpStatements'][] = $value;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
unset($attrTmp);
|
||||
|
||||
// Alles, was über dem ArrayIndex 3 liegt, wird gelöscht:
|
||||
if (!is_array($attr)) $attr = array();
|
||||
|
||||
$this->orig = $attr;
|
||||
|
|
Loading…
Reference in New Issue