From d6eb21f7a625cc296ad6f1052a07efe9a4b05d72 Mon Sep 17 00:00:00 2001 From: andryyy Date: Sun, 15 Aug 2021 20:19:28 +0200 Subject: [PATCH] [Web] Fix some empty responses in alert box --- data/web/inc/functions.inc.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/data/web/inc/functions.inc.php b/data/web/inc/functions.inc.php index c6642418..142a9fed 100644 --- a/data/web/inc/functions.inc.php +++ b/data/web/inc/functions.inc.php @@ -695,6 +695,9 @@ function alertbox_log_parser($_data) { if (isset($lang[$return['type']][$return['msg']])) { $msg = $lang[$return['type']][$return['msg']]; } + else { + $msg = $return['msg']; + } } // If msg is an array, use first element as language string and run printf on it with remaining array elements elseif (is_array($return['msg'])) { @@ -704,9 +707,8 @@ function alertbox_log_parser($_data) { $return['msg'] ); } - // If none applies, use msg as returned message else { - $msg = $return['msg']; + $msg = '-'; } $log_array[] = array('msg' => $msg, 'type' => json_encode($type)); }