From 798902542ea24623515f00bbdfd46cb83049652b Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Wed, 21 Oct 2015 09:09:36 +0000 Subject: [PATCH] * Filemanager/Mail/LDAP/UCS: fix not working sharing, if accounts are stored in ldap $GLOBALS[egw]->ldap returns NULL, which should not happen as egw objects checks for isset, anyway checking the object here fixes the problem --- addressbook/inc/class.addressbook_ldap.inc.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addressbook/inc/class.addressbook_ldap.inc.php b/addressbook/inc/class.addressbook_ldap.inc.php index 0a60106efb..acfcc9bc04 100644 --- a/addressbook/inc/class.addressbook_ldap.inc.php +++ b/addressbook/inc/class.addressbook_ldap.inc.php @@ -317,7 +317,7 @@ class addressbook_ldap function connect($admin = false) { // if egw object does not yet exists (eg. in sharing), we have to use our own ldap instance! - $ldap = isset($GLOBALS['egw']) ? $GLOBALS['egw']->ldap : new ldap(); + $ldap = isset($GLOBALS['egw']) && is_a($GLOBALS['egw']->ldap, 'ldap') ? $GLOBALS['egw']->ldap : new ldap(); if ($admin) {