From: hickert Date: Mon, 22 Nov 2010 10:49:08 +0000 (+0000) Subject: In some cases, eg. when a plugin isn't installed, we may receive an empty string... X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=7f5569626475b2c16b98815377c8420bbaa67b60;p=gosa.git In some cases, eg. when a plugin isn't installed, we may receive an empty string when calling get('...'); This leads to errors in the the ldap filtering class. git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@20316 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/gosa-core/include/class_filterLDAP.inc b/gosa-core/include/class_filterLDAP.inc index 34aff04a8..feda5169a 100644 --- a/gosa-core/include/class_filterLDAP.inc +++ b/gosa-core/include/class_filterLDAP.inc @@ -35,6 +35,13 @@ class filterLDAP { $bases[$base]= ""; } else { foreach ($objectStorage as $oc) { + + // Handle empty storage locatios here, maybe get_ou() as returned an empty string. + if(empty($oc)){ + $bases[$base] = ""; + continue; + } + $oc= preg_replace('/,$/', '', $oc); $tmp= explode(',', $oc); if (count($tmp) == 1) {