[Tickets #4458] NEW: Group_LDAP driver returns PEAR_Error incorrectly

bugs@bugs.horde.org bugs at bugs.horde.org
Sat Sep 23 22:22:06 PDT 2006


DO NOT REPLY TO THIS MESSAGE. THIS EMAIL ADDRESS IS NOT MONITORED.

Ticket URL: https://dev.horde.org/horde/whups/ticket/?id=4458
-----------------------------------------------------------------------
 Ticket             | 4458
 Created By         | Ben Klang <ben at alkaloid.net>
 Summary            | Group_LDAP driver returns PEAR_Error incorrectly
 Queue              | Horde Framework Packages
 Version            | FRAMEWORK_3
 Type               | Bug
 State              | Unconfirmed
 Priority           | 1. Low
 Owners             | 
-----------------------------------------------------------------------


Ben Klang <ben at alkaloid.net> (2006-09-23 22:22) wrote:

When creating a new group with te Group_LDAP driver, the Horde framework
first calls newGroup to create the group object then follows by calling
addGroup().  The problem comes from the fact that newGroup() is not
allowed to fail with a PEAR_Error and is expected to be a valid
Horde_Group object.  However by simply specifying a blank group name,
Group_ldap::newGroup returns a PEAR_Error causing a PHP fatal message
similar to:

Fatal error: Call to undefined function: getshortname() in
horde/admin/groups.php on line 54

This is further bad news if you want to be able to use the groupldap hook
and need to fail gracefully with a message.

I looked at a couple options on how to resolve this but I'm not sure of
the best choice.  I think what needs to happen is the check for an empty
group name and the call to the groupldap hook must be moved to the
addGroup() method which is expected to be able to return PEAR_Error.  But
I'm not sure how this might impact the driver in a bigger scope, so I'm
posting the bug here.




More information about the bugs mailing list