From 4914ea25dd74f15f179161ed4c7b8e1b8280d3ec Mon Sep 17 00:00:00 2001 From: hickert Date: Thu, 10 Apr 2008 11:56:22 +0000 Subject: [PATCH] Avoid undefined index count messages git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@10323 594d385d-05f5-0310-b6e9-bd551577e9d8 --- gosa-core/include/class_plugin.inc | 17 +++++++++++------ gosa-core/include/php_setup.inc | 4 ++-- 2 files changed, 13 insertions(+), 8 deletions(-) diff --git a/gosa-core/include/class_plugin.inc b/gosa-core/include/class_plugin.inc index 868626da6..5fd81afbb 100644 --- a/gosa-core/include/class_plugin.inc +++ b/gosa-core/include/class_plugin.inc @@ -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'])){ diff --git a/gosa-core/include/php_setup.inc b/gosa-core/include/php_setup.inc index c93d40f9b..1f821e2c7 100644 --- a/gosa-core/include/php_setup.inc +++ b/gosa-core/include/php_setup.inc @@ -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 */ -- 2.30.2