|
|
@@ -92,12 +92,13 @@ class CreateAccountCosQuota extends CreateAccount
|
|
|
/**
|
|
|
* check if limit has been reached
|
|
|
*/
|
|
|
- if ($cosLimits[$this->formData['cosId']] !== Size::UNLIMITED && count($groupedByCos[$this->formData['cosId']]) >= $cosLimits[$this->formData['cosId']] && $this->formData['cosId'] !== $this->formData['currentCosId'])
|
|
|
- {
|
|
|
- $this->setError('There are too many mailboxes with selected quota limit');
|
|
|
- return false;
|
|
|
+ if(is_countable($groupedByCos[$this->formData['cosId']])) {
|
|
|
+ if ($cosLimits[$this->formData['cosId']] !== Size::UNLIMITED && count($groupedByCos[$this->formData['cosId']]) >= $cosLimits[$this->formData['cosId']] && $this->formData['cosId'] !== $this->formData['currentCosId'])
|
|
|
+ {
|
|
|
+ $this->setError('There are too many mailboxes with selected quota limit');
|
|
|
+ return false;
|
|
|
+ }
|
|
|
}
|
|
|
-
|
|
|
return true;
|
|
|
}
|
|
|
|