From: hickert Date: Thu, 10 Apr 2008 11:56:22 +0000 (+0000) Subject: Avoid undefined index count messages X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=4914ea25dd74f15f179161ed4c7b8e1b8280d3ec;p=gosa.git Avoid undefined index count messages git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@10323 594d385d-05f5-0310-b6e9-bd551577e9d8 --- 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 */