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

@ -292,7 +292,7 @@ class ModuleActionParser extends BaseParser
{
if (isset($attrs[$key]))
{
if (count($info->namespaces) && str_contains($attrs['class'], '\\'))
if (count($info->namespaces) && !preg_match('/^(controller|model|view|mobile|api|wap|class)$/', $attrs['class']))
{
$namespace = '\\' . array_first($info->namespaces) . '\\';
}