From b1d61dc7808b58c32a70dc53aeb84c693847cb5d Mon Sep 17 00:00:00 2001 From: cajus Date: Mon, 24 Sep 2007 09:56:05 +0000 Subject: [PATCH] Fixed wrong if results with strcasecmp git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@7387 594d385d-05f5-0310-b6e9-bd551577e9d8 --- include/class_config.inc | 2 +- include/functions.inc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/include/class_config.inc b/include/class_config.inc index 3fdc372c3..036872656 100644 --- a/include/class_config.inc +++ b/include/class_config.inc @@ -757,7 +757,7 @@ class config { $return= strtoupper($return); if (is_array($arr)){ foreach ($arr as &$a){ - if (isset($a['CLASS']) && strcasecmp($name, $a['CLASS'])){ + if (isset($a['CLASS']) && strcasecmp($name, $a['CLASS']) == 0){ return(isset($a[$return])?$a[$return]:""); } else { $res= $this->__search ($a, $name, $return); diff --git a/include/functions.inc b/include/functions.inc index 425bcaa73..8e2de5bdd 100644 --- a/include/functions.inc +++ b/include/functions.inc @@ -1687,7 +1687,7 @@ function in_array_ics($value, $items) } foreach ($items as $item){ - if (strcasecmp($item, $value)) { + if (strcasecmp($item, $value) == 0) { return (TRUE); } } -- 2.30.2