[LOG] Only try to log if setup, so logs can be disabled, in tests, for instance

This commit is contained in:
Hugo Sales 2021-04-05 13:43:32 +00:00
parent 7e648a296f
commit 8d25859de7
Signed by: someonewithpc
GPG Key ID: 7D0C7EAFC9D835A0
1 changed files with 3 additions and 1 deletions

View File

@ -47,6 +47,8 @@ abstract class Log
*/
public static function __callStatic(string $name, array $args)
{
return self::$logger->{$name}(...$args);
if (isset(self::$logger)) {
return self::$logger->{$name}(...$args);
}
}
}