diff options
Diffstat (limited to 'includes/helper/message_helper.php')
-rw-r--r-- | includes/helper/message_helper.php | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/includes/helper/message_helper.php b/includes/helper/message_helper.php index 7a42a7b7..4fa0efe3 100644 --- a/includes/helper/message_helper.php +++ b/includes/helper/message_helper.php @@ -57,16 +57,17 @@ function success($msg, $immediately = false) * @param string $class * @param string $msg * @param bool $immediately - * @return string|null + * @return string */ function alert($class, $msg, $immediately = false) { $session = session(); + if (empty($msg)) { + return ''; + } + if ($immediately) { - if ($msg == '') { - return ''; - } return '<div class="alert alert-' . $class . '">' . $msg . '</div>'; } @@ -74,5 +75,5 @@ function alert($class, $msg, $immediately = false) $message .= alert($class, $msg, true); $session->set('msg', $message); - return null; + return ''; } |