[Tickets #9826] Re: Schema checking broken in Turba_Driver_Ldap
bugs at horde.org
bugs at horde.org
Tue Apr 26 13:38:29 UTC 2011
BITTE NICHT AUF DIESE NACHRICHT ANTWORTEN. NACHRICHTEN AN DIESE
E-MAIL-ADRESSE WERDEN NICHT GELESEN.
Ticket-URL: http://bugs.horde.org/ticket/9826
------------------------------------------------------------------------------
Ticket | 9826
Aktualisiert Von | heinz at htl-steyr.ac.at
Zusammenfassung | Schema checking broken in Turba_Driver_Ldap
Warteschlange | Turba
Version | 3.0
Typ | Bug
Status | Resolved
Priorität | 2. Medium
Milestone | 3.0.1
Patch |
Zuständige | Jan Schneider
------------------------------------------------------------------------------
heinz at htl-steyr.ac.at (2011-04-26 13:38) hat geschrieben:
I upgraded to PEAR package Horde_Ldap version 1.1.0
There is still a problem in class Horde_Ldap_Schema.
If there is an objectclass with no must attributes but superclasses
would have one,
an empty array is returned.
current code:
public function must($oc, $checksup = false)
{
try {
$attributes = $this->_getAttr($oc, 'must');
if ($checksup) {
foreach ($this->superclass($oc) as $sup) {
$attributes = array_merge($attributes, $this->must($sup));
}
$attributes = array_values(array_unique($attributes));
}
return $attributes;
} catch (Horde_Ldap_Exception $e) {
return array();
}
}
_getAttr throws an Exception and if catched an empty arry ist
returned, no superclass is called
Possible solution:
public function must($oc, $checksup = false)
{
try {
$attributes = $this->_getAttr($oc, 'must');
} catch (Horde_Ldap_Exception $e) {
$attributes = array();
}
if ($checksup) {
foreach ($this->superclass($oc) as $sup) {
$attributes = array_merge($attributes,
$this->must($sup, true));
}
$attributes = array_values(array_unique($attributes));
}
return $attributes;
}
More information about the bugs
mailing list