Fix #2098 create an instance of MessageMobile class instead of MessageView if user is mobile

This commit is contained in:
Kijin Sung 2023-04-02 15:40:57 +09:00
parent 34a4119dcc
commit 875e5d1c2c

View file

@ -949,7 +949,15 @@ class ModuleHandler extends Handler
}
self::_setInputErrorToContext();
$oMessageObject = MessageView::getInstance();
if (Mobile::isFromMobilePhone())
{
$oMessageObject = MessageMobile::getInstance();
}
else
{
$oMessageObject = MessageView::getInstance();
}
$oMessageObject->setError($error);
$oMessageObject->setMessage($message);
$oMessageObject->setHttpStatusCode($status_code ?: 403);