Browse code

avoid warning about unset variable

Hanno authored on25/06/2018 10:48:34
Showing1 changed files
... ...
@@ -305,7 +305,7 @@ function save_vmail_account($account)
305 305
     $newquota = max((int) config('vmail_basequota'), (int) $account['quota']);
306 306
     if ($newquota > config('vmail_basequota') && $newquota > ($free+config('vmail_basequota'))) {
307 307
       $newquota = $free + config('vmail_basequota');
308
-      if ($account['quota'] >= $oldaccount['quota'] && $newquota < $oldaccount['quota']) {
308
+      if (isset($oldaccount) && $account['quota'] >= $oldaccount['quota'] && $newquota < $oldaccount['quota']) {
309 309
         # Wenn das Limit k√ľnstlich reduziert wurde, dann maximal auf den alten Wert.
310 310
         $newquota = $oldaccount['quota'];
311 311
       }