try a bit harder to avoid non-numeric argument issues with $multiplier

(see https://github.com/postfixadmin/postfixadmin/issues/266 )
pull/277/head
David Goodwin 5 years ago
parent 8e2e4eb189
commit 3ff2436f2f

@ -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

Loading…
Cancel
Save