NobGit
public nobgit read

NobMail

Based on mailcow: dockerized

Languages

Repository composition by tracked source files.

PHP
PHP 49% JavaScript 35% HTML 9% CSS 4% Shell 2% Python 1% Lua 0% Perl 0% Ruby 0% SCSS 0%
Create file Wiki Documentation
Clone
https://nobgit.com/orgs/nobgit/nobmail.git
ssh://[email protected]:2222/orgs/nobgit/nobmail.git

Commit

[Web] Return json array when mailq empty, fixes #3738

8a296e90
andryyy <[email protected]> 6 years ago
data/web/inc/functions.mailq.inc.php | 2 +-
 data/web/json_api.php                | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

Diff

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;
               }