Browse Source

added check to see if username was blank before strtolower function called

CauseFX 4 years ago
parent
commit
fdb6f33d18
1 changed files with 2 additions and 1 deletions
  1. 2 1
      api/functions/log-functions.php

+ 2 - 1
api/functions/log-functions.php

@@ -221,7 +221,8 @@ trait LogFunctions
 					}
 				}
 				if ($username) {
-					if (strtolower($this->logger->getTraceId()) !== strtolower($channel)) {
+					$currentUsername = $this->logger->getTraceId() !== '' ? strtolower($this->logger->getTraceId()) : '';
+					if ($currentUsername !== strtolower($username)) {
 						$setLogger = true;
 					}
 				}