From 1aaf87ee9ac52e502adb89ac7d32f7f3d306a69c Mon Sep 17 00:00:00 2001 From: hickert Date: Thu, 6 Apr 2006 04:15:28 +0000 Subject: [PATCH] fix undefined index git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@2998 594d385d-05f5-0310-b6e9-bd551577e9d8 --- plugins/admin/systems/class_termDNS.inc | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/plugins/admin/systems/class_termDNS.inc b/plugins/admin/systems/class_termDNS.inc index 299335cb8..b6b6b352f 100644 --- a/plugins/admin/systems/class_termDNS.inc +++ b/plugins/admin/systems/class_termDNS.inc @@ -214,18 +214,19 @@ class termDNS extends plugin if(isset($_POST['network_tpl_posted'])){ /* Check for posted record changes */ - foreach($this->dnsEntry['RECORDS'] as $key => $value){ - - /* Check if type has changed */ - if(isset($_POST['RecordTypeSelectedFor_'.$key])){ - $this->dnsEntry['RECORDS'][$key]['type'] = $_POST['RecordTypeSelectedFor_'.$key]; - } - /* Check if value has changed */ - if(isset($_POST['RecordValue_'.$key])){ - $this->dnsEntry['RECORDS'][$key]['value'] = $_POST['RecordValue_'.$key]; + if(is_array($this->dnsEntry['RECORDS'])){ + foreach($this->dnsEntry['RECORDS'] as $key => $value){ + + /* Check if type has changed */ + if(isset($_POST['RecordTypeSelectedFor_'.$key])){ + $this->dnsEntry['RECORDS'][$key]['type'] = $_POST['RecordTypeSelectedFor_'.$key]; + } + /* Check if value has changed */ + if(isset($_POST['RecordValue_'.$key])){ + $this->dnsEntry['RECORDS'][$key]['value'] = $_POST['RecordValue_'.$key]; + } } } - /* Get all basic DNS attributes (TTL, Clas ..)*/ foreach($this->DNSattributes as $attr){ if(isset($_POST[$attr])){ -- 2.30.2