Sfoglia il codice sorgente

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

CauseFX 4 anni fa
parent
commit
fdb6f33d18
1 ha cambiato i file con 2 aggiunte e 1 eliminazioni
  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;
 					}
 				}