reordered some lines because PHP5 is more strict on using "unset"

This commit is contained in:
Roland Gruber 2005-07-04 16:44:36 +00:00
parent 04e5764956
commit d82f21feff
1 changed files with 4 additions and 4 deletions

View File

@ -179,16 +179,16 @@ class cache {
while ($entry) {
$dn = (ldap_get_dn($_SESSION['ldap']->server(), $entry));
$attr = ldap_get_attributes($_SESSION['ldap']->server(), $entry);
// unset double entries
for ($i=0; $i<count($attr); $i++) {
if (isset($attr[$i])) unset($attr[$i]);
}
// unset every count entry
unset ($attr['count']);
$attributes = array_keys($attr);
foreach ($attributes as $attribute) {
unset ($attr[$attribute]['count']);
}
// unset double entries
for ($i=0; $i<count($attr); $i++) {
if (isset($attr[$i])) unset($attr[$i]);
}
// Write new cache entry
$addcache = $attr;
unset ($addcache['objectClass']);