From 40c87435c1c9cc3016ed737b8443739a96952c19 Mon Sep 17 00:00:00 2001 From: Matthias Beyer Date: Thu, 19 Sep 2013 11:07:14 +0200 Subject: [PATCH] Instance caching added There was already a variable to cache the ldap driver instance, and a check if this variable was already set was there, too! But there was no code to return the cached instance if the function gets called twice! Maybe this was simply forgotten... --- inc/drivers_ldap.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/inc/drivers_ldap.php b/inc/drivers_ldap.php index a6665297..a6f7211f 100644 --- a/inc/drivers_ldap.php +++ b/inc/drivers_ldap.php @@ -254,6 +254,10 @@ function getStaticLdap() { // If the instance is not there, create one if(!isset($instance)) { $ldapDrivers = new ldapDrivers($c->authenticate_hook['config']); + $instance = $ldapDrivers + } + else { + $ldapDrivers = $instance } return $ldapDrivers; }