mirror of
https://github.com/Karaka-Management/phpOMS.git
synced 2026-01-11 09:48:40 +00:00
Allow to return null module
This commit is contained in:
parent
ed34d8d454
commit
e60952e75b
|
|
@ -604,7 +604,7 @@ final class ModuleManager
|
|||
$this->initModule($module);
|
||||
}
|
||||
|
||||
return $this->running[$module];
|
||||
return $this->running[$module] ?? new NullModule();
|
||||
} catch (\Exception $e) {
|
||||
throw $e;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -24,4 +24,5 @@ namespace phpOMS\Module;
|
|||
*/
|
||||
final class NullModule extends ModuleAbstract
|
||||
{
|
||||
public function __construct() {}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user