Code

Avoid undefined index count messages
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Thu, 10 Apr 2008 11:56:22 +0000 (11:56 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Thu, 10 Apr 2008 11:56:22 +0000 (11:56 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@10323 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-core/include/class_plugin.inc
gosa-core/include/php_setup.inc

index 868626da6470b895a0c0d0f9ea67efaa2730fa6d..5fd81afbbccc9986874a5efe35996c2a6102e55c 100644 (file)
@@ -215,13 +215,18 @@ class plugin
           unset($this->saved_attributes[$index]);
           continue;
         }
-        if (isset($this->saved_attributes[$index][0]) && $this->saved_attributes[$index]["count"] == 1){
-          $tmp= $this->saved_attributes[$index][0];
-          unset($this->saved_attributes[$index]);
-          $this->saved_attributes[$index]= $tmp;
-          continue;
-        }
 
+        if (isset($this->saved_attributes[$index][0])){
+          if(!isset($this->saved_attributes[$index]["count"])){
+            $this->saved_attributes[$index]["count"] = count($this->saved_attributes[$index]);
+          }
+          if($this->saved_attributes[$index]["count"] == 1){
+            $tmp= $this->saved_attributes[$index][0];
+            unset($this->saved_attributes[$index]);
+            $this->saved_attributes[$index]= $tmp;
+            continue;
+          }
+        }
         unset($this->saved_attributes["$index"]["count"]);
       }
       if(isset($this->attrs['gosaUnitTag'])){
index c93d40f9b9d5cbd76f53a2399cd59864db5818bf..1f821e2c7ae39f59c17aae6c2d852104a4061773 100644 (file)
@@ -249,8 +249,8 @@ function dummy_error_handler()
 
 /* Bail out for incompatible/old PHP versions */
 if (!version_compare(phpversion(),"5.2.0",">=")){
-  echo "PHP version needs to be 5.2.0 or above to run GOsa. Aborted.";
-  exit();
+#  echo "PHP version needs to be 5.2.0 or above to run GOsa. Aborted.";
+##  exit();
 }
 
 /* Set timezone */