fix warning
Bernd Wurst

Bernd Wurst commited on 2020-05-01 11:40:08
Zeige 1 geänderte Dateien mit 3 Einfügungen und 0 Löschungen.

... ...
@@ -200,6 +200,9 @@ function get_max_mailboxquota($server, $oldquota)
200 200
     $server = (int) $server;
201 201
     $result = db_query("SELECT systemquota - (COALESCE(systemquota_used,0) + COALESCE(mailquota,0)) AS free FROM system.v_quota WHERE uid=:uid AND server=:server", array(":uid" => $uid, ":server" => $server));
202 202
     $item = $result->fetch();
203
+    if (! $item) {
204
+        return $oldquota - config('vmail_basequota');
205
+    }
203 206
     DEBUG("Free space: ".$item['free']." / Really: ".($item['free'] + ($oldquota - config('vmail_basequota'))));
204 207
     return max(0, $item['free'] + ($oldquota - config('vmail_basequota')));
205 208
 }
206 209