Fix #2241 inconsistent handling of class name specified in event handler

This commit is contained in:
Kijin Sung 2023-12-30 20:45:48 +09:00
parent 1c0f3cd2e2
commit 3e09ca63a9
2 changed files with 2 additions and 2 deletions

View file

@ -1321,7 +1321,7 @@ class ModuleHandler extends Handler
$called_method = $item->called_method;
// Get instance of module class
if (strpos($type, '\\') !== false)
if (!preg_match('/^(controller|model|view|mobile|api|wap|class)$/', $type))
{
$class_name = ($type[0] === '\\') ? $type : sprintf('Rhymix\\Modules\\%s\\%s', $module, $type);
if (class_exists($class_name))