mirror of
https://github.com/Karaka-Management/phpOMS.git
synced 2026-02-12 06:48:41 +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);
|
$this->initModule($module);
|
||||||
}
|
}
|
||||||
|
|
||||||
return $this->running[$module];
|
return $this->running[$module] ?? new NullModule();
|
||||||
} catch (\Exception $e) {
|
} catch (\Exception $e) {
|
||||||
throw $e;
|
throw $e;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -24,4 +24,5 @@ namespace phpOMS\Module;
|
||||||
*/
|
*/
|
||||||
final class NullModule extends ModuleAbstract
|
final class NullModule extends ModuleAbstract
|
||||||
{
|
{
|
||||||
|
public function __construct() {}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user