check if logger is set before using it

This commit is contained in:
Uwe Steinmann 2023-03-21 11:25:08 +01:00
parent 197a6e8824
commit 882b87c885

View File

@ -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;