From 3ff2436f2f60c0bd3737d8a8103a9da1d0f8ee87 Mon Sep 17 00:00:00 2001 From: David Goodwin Date: Mon, 10 Jun 2019 20:13:16 +0100 Subject: [PATCH] try a bit harder to avoid non-numeric argument issues with $multiplier (see https://github.com/postfixadmin/postfixadmin/issues/266 ) --- model/MailboxHandler.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/model/MailboxHandler.php b/model/MailboxHandler.php index 912a2973..9f68af7e 100644 --- a/model/MailboxHandler.php +++ b/model/MailboxHandler.php @@ -219,7 +219,7 @@ class MailboxHandler extends PFAHandler { protected function beforestore() { if (isset($this->values['quota']) && $this->values['quota'] != -1) { $multiplier = Config::read_string('quota_multiplier'); - if ($multiplier == 0) { // or empty string, or null, or false... + if ($multiplier == 0 || !is_numeric($multiplier)) { // or empty string, or null, or false... $multiplier = 1; } $this->values['quota'] = $this->values['quota'] * $multiplier; # convert quota from MB to bytes