From 882b87c8855b213a0ddc7132c5186d204c5f6794 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Tue, 21 Mar 2023 11:25:08 +0100 Subject: [PATCH] check if logger is set before using it --- inc/inc.ClassAuthenticationService.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/inc/inc.ClassAuthenticationService.php b/inc/inc.ClassAuthenticationService.php index 41119877a..f04ac304d 100644 --- a/inc/inc.ClassAuthenticationService.php +++ b/inc/inc.ClassAuthenticationService.php @@ -66,7 +66,8 @@ class SeedDMS_AuthenticationService { public function authenticate($username, $password) { /* {{{ */ $user = null; foreach($this->services as $name => $service) { - $this->logger->log('Authentication service \''.$name.'\'', PEAR_LOG_INFO); + if($this->logger) + $this->logger->log('Authentication service \''.$name.'\'', PEAR_LOG_INFO); $user = $service->authenticate($username, $password); if($user === false) { $this->errors[$name] = false;