After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 502226 - lib/ldap.php does not return error messages raised during connection to LDAP server
lib/ldap.php does not return error messages raised during connection to LDAP ...
Status: RESOLVED FIXED
Product: sysadmin
Classification: Infrastructure
Component: Mango (obsolete)
unspecified
Other All
: Normal minor
: ---
Assigned To: GNOME Sysadmins
GNOME Sysadmins
Depends on:
Blocks: 502229
 
 
Reported: 2007-12-07 00:14 UTC by Patrick Fey
Modified: 2007-12-08 14:49 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Patch for lib/ldap.php (2.47 KB, patch)
2007-12-07 00:17 UTC, Patrick Fey
committed Details | Review

Description Patrick Fey 2007-12-07 00:14:18 UTC
Currently, error messages raised in lib/ldap.php are not returned to the calling method due to the singleton implementation in the class. lib/ldap.php either returns an LDAP ressource handle or null, if no ressource handle could be created.

If an error message was raised during connection, this error messsage should be returned to the calling method somehow. Otherwise, it doesn't make sense to raise the error in the first place.
Comment 1 Patrick Fey 2007-12-07 00:17:52 UTC
Created attachment 100487 [details] [review]
Patch for lib/ldap.php

This patch introduces an internal variable $this->error that can be used to store error objects raised during connection. The signleton method can then return the error object instead of a ldap connection ressource handle, if an error was raised during connection to the ldap server.
Comment 2 Olav Vitters 2007-12-08 14:42:15 UTC
This contained another patch as well. Reworked so it applied and checked it in.