Code

Added check to avoid, undefined index message
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Fri, 11 Apr 2008 07:50:19 +0000 (07:50 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Fri, 11 Apr 2008 07:50:19 +0000 (07:50 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@10344 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-plugins/dhcp/admin/systems/services/dhcp/class_dhcpService.inc

index 01a6ea262547fd96aeb2ff73ac342e6e8accc8cb..5856976d3590e539b885f5ad9b10504de54cc0f6 100644 (file)
@@ -165,7 +165,9 @@ class dhcpService extends dhcpPlugin
     $ldap= $config->get_ldap_link();
     $ldap->cat($this->dhcpPrimaryDN, array('cn'));
     $res= $ldap->fetch();
-    $server_name= $res['cn'][0];
+    if(isset($res['cn'][0])){
+      $server_name= $res['cn'][0];
+    }
     
     dhcpPlugin::save();