From 94fff02d396a2505d1046780d8a64613504c9a80 Mon Sep 17 00:00:00 2001 From: David Goodwin Date: Fri, 15 May 2020 20:30:31 +0100 Subject: [PATCH] fix MailboxHandler -> adding mailbox with empty quota field --- model/MailboxHandler.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/model/MailboxHandler.php b/model/MailboxHandler.php index a0d35d6c..38b7b9c7 100644 --- a/model/MailboxHandler.php +++ b/model/MailboxHandler.php @@ -224,6 +224,11 @@ class MailboxHandler extends PFAHandler { $this->values['quota'] = $this->values['quota'] * $multiplier; # convert quota from MB to bytes } + // Avoid trying to store '' in an integer field + if($this->values['quota'] === '') { + $this->values['quota'] = 0; + } + $ah = new AliasHandler($this->new, $this->admin_username); $ah->calledBy('MailboxHandler');