From 338fb8c5644d3186c26232d0c1e85a4375b20386 Mon Sep 17 00:00:00 2001 From: David Goodwin Date: Wed, 18 Mar 2020 14:36:53 +0000 Subject: [PATCH] Fix quota storage; see https://github.com/postfixadmin/postfixadmin/issues/342 --- model/MailboxHandler.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/model/MailboxHandler.php b/model/MailboxHandler.php index b5ee2551..826eff72 100644 --- a/model/MailboxHandler.php +++ b/model/MailboxHandler.php @@ -206,7 +206,7 @@ class MailboxHandler extends PFAHandler { protected function read_from_db_postprocess($db_result) { foreach ($db_result as $key => $row) { - if (isset($row['quota']) && !empty($row['quota'])) { # quota could be disabled in $struct + if (isset($row['quota']) && is_numeric($row['quota']) && $row['quota'] > -1) { # quota could be disabled in $struct $db_result[$key]['quotabytes'] = $row['quota']; $db_result[$key]['quota'] = divide_quota($row['quota']); # convert quota to MB } else {