Update 2024-09-03 00:44:02

This commit is contained in:
Robot 2024-09-03 00:44:34 +02:00
parent a62938ca20
commit ceb508698d
Signed by: Robot
GPG Key ID: 14DECD44E7E1BB95
2 changed files with 32 additions and 4 deletions

View File

@ -169,9 +169,16 @@ abstract class UserHelper
{ {
$errors = $model->getError(); $errors = $model->getError();
if (!empty($errors)) if (!empty($errors))
{
if (is_array($errors))
{ {
$error_messages = '<br>' . implode('<br>', $errors); $error_messages = '<br>' . implode('<br>', $errors);
} }
elseif (is_string($errors))
{
$error_messages = '<br>' . $errors;
}
}
} }
throw new \RuntimeException( throw new \RuntimeException(
@ -232,9 +239,16 @@ abstract class UserHelper
{ {
$errors = $model->getError(); $errors = $model->getError();
if (!empty($errors)) if (!empty($errors))
{
if (is_array($errors))
{ {
$error_messages = '<br>' . implode('<br>', $errors); $error_messages = '<br>' . implode('<br>', $errors);
} }
elseif (is_string($errors))
{
$error_messages = '<br>' . $errors;
}
}
} }
throw new \RuntimeException( throw new \RuntimeException(

View File

@ -137,9 +137,16 @@
{ {
$errors = $model->getError(); $errors = $model->getError();
if (!empty($errors)) if (!empty($errors))
{
if (is_array($errors))
{ {
$error_messages = '<br>' . implode('<br>', $errors); $error_messages = '<br>' . implode('<br>', $errors);
} }
elseif (is_string($errors))
{
$error_messages = '<br>' . $errors;
}
}
} }
throw new \RuntimeException( throw new \RuntimeException(
@ -200,9 +207,16 @@
{ {
$errors = $model->getError(); $errors = $model->getError();
if (!empty($errors)) if (!empty($errors))
{
if (is_array($errors))
{ {
$error_messages = '<br>' . implode('<br>', $errors); $error_messages = '<br>' . implode('<br>', $errors);
} }
elseif (is_string($errors))
{
$error_messages = '<br>' . $errors;
}
}
} }
throw new \RuntimeException( throw new \RuntimeException(