Ver Fonte

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

CauseFX há 4 anos atrás
pai
commit
fdb6f33d18
1 ficheiros alterados com 2 adições e 1 exclusões
  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;
 					}
 				}