From 8a296e90c3615ee2aaf261edae02eece83ec29f0 Mon Sep 17 00:00:00 2001 From: andryyy Date: Sun, 6 Sep 2020 11:59:36 +0200 Subject: [PATCH] [Web] Return json array when mailq empty, fixes #3738 --- data/web/inc/functions.mailq.inc.php | 2 +- data/web/json_api.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/data/web/inc/functions.mailq.inc.php b/data/web/inc/functions.mailq.inc.php index 23e9fb72..f42ab7cc 100644 --- a/data/web/inc/functions.mailq.inc.php +++ b/data/web/inc/functions.mailq.inc.php @@ -71,7 +71,7 @@ function mailq($_action, $_data = null) { } } if (!isset($line) || empty($line)) { - return '{}'; + return '[]'; } else { return json_encode($line); diff --git a/data/web/json_api.php b/data/web/json_api.php index 38f59dc6..241e59b5 100644 --- a/data/web/json_api.php +++ b/data/web/json_api.php @@ -370,7 +370,7 @@ if (isset($_SESSION['mailcow_cc_role']) || isset($_SESSION['pending_mailcow_cc_u echo $mailq; } else { - echo '{}'; + echo '[]'; } break; }