Explorar el Código

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

CauseFX hace 4 años
padre
commit
fdb6f33d18
Se han modificado 1 ficheros con 2 adiciones y 1 borrados
  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;
 					}
 				}