This commit is contained in:
Dennis Eichhorn 2023-09-21 15:32:28 +00:00
parent d78dfa7e74
commit 7882ce95be

View File

@ -125,7 +125,8 @@ abstract class ModuleAbstract
$this->app = $app ?? new class() extends ApplicationAbstract {};
if (self::$auditor === null && static::ID !== 1006200000) {
self::$auditor = $this->app->moduleManager->get('Auditor', 'Api');
/** @phpstan-ignore-next-line */
self::$auditor = $this->app->moduleManager?->get('Auditor', 'Api');
self::$auditor = self::$auditor === null || self::$auditor::ID === 0 ? null : self::$auditor;
}
}