Parcourir la source

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

CauseFX il y a 4 ans
Parent
commit
fdb6f33d18
1 fichiers modifiés avec 2 ajouts et 1 suppressions
  1. 2 1
      api/functions/log-functions.php

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

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