Browse Source

[Web] fix wrong log type on PDOException

FreddleSpl0it 1 year ago
parent
commit
c034f4bd27
1 changed files with 4 additions and 4 deletions
  1. 4 4
      data/web/inc/functions.mailbox.inc.php

+ 4 - 4
data/web/inc/functions.mailbox.inc.php

@@ -1328,9 +1328,9 @@ function mailbox($_action, $_type, $_data = null, $_extra = null) {
        
        
           try {
           try {
             update_sogo_static_view($username);
             update_sogo_static_view($username);
-          }catch (PDOException $e) {
+          } catch (PDOException $e) {
             $_SESSION['return'][] = array(
             $_SESSION['return'][] = array(
-              'type' => 'success',
+              'type' => 'danger',
               'log' => array(__FUNCTION__, $_action, $_type, $_data_log, $_attr),
               'log' => array(__FUNCTION__, $_action, $_type, $_data_log, $_attr),
               'msg' => $e->getMessage()
               'msg' => $e->getMessage()
             );
             );
@@ -3257,9 +3257,9 @@ function mailbox($_action, $_type, $_data = null, $_extra = null) {
 
 
             try {
             try {
               update_sogo_static_view($username);
               update_sogo_static_view($username);
-            }catch (PDOException $e) {
+            } catch (PDOException $e) {
               $_SESSION['return'][] = array(
               $_SESSION['return'][] = array(
-                'type' => 'success',
+                'type' => 'danger',
                 'log' => array(__FUNCTION__, $_action, $_type, $_data_log, $_attr),
                 'log' => array(__FUNCTION__, $_action, $_type, $_data_log, $_attr),
                 'msg' => $e->getMessage()
                 'msg' => $e->getMessage()
               );
               );