mirror of
https://github.com/Karaka-Management/phpOMS.git
synced 2026-01-11 09:48:40 +00:00
handle nullmodule function calls
This commit is contained in:
parent
8477cbe90e
commit
f554feae82
|
|
@ -14,6 +14,8 @@ declare(strict_types=1);
|
|||
|
||||
namespace phpOMS\Module;
|
||||
|
||||
use phpOMS\Log\FileLogger;
|
||||
|
||||
/**
|
||||
* Module abstraction class.
|
||||
*
|
||||
|
|
@ -24,5 +26,22 @@ namespace phpOMS\Module;
|
|||
*/
|
||||
final class NullModule extends ModuleAbstract
|
||||
{
|
||||
/** {@inheritdoc} */
|
||||
public function __call(string $name, array $arguments): void
|
||||
{
|
||||
self::__callStatic($name, $arguments);
|
||||
}
|
||||
|
||||
/** {@inheritdoc} */
|
||||
public static function __callStatic(string $name, array $arguments): void
|
||||
{
|
||||
FileLogger::getInstance('', false)
|
||||
->error(
|
||||
FileLogger::MSG_FULL, [
|
||||
'message' => 'Expected module/controller but got NullModule.',
|
||||
'line' => __LINE__,
|
||||
'file' => self::class,
|
||||
]
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user