|
|
@@ -70,13 +70,13 @@ class CreateAccount extends ApiService
|
|
|
$acc_add = $acc_addObj->qty ? $acc_addObj->qty : 0;
|
|
|
$accountLimit = $this->productManager->get('acc_base') + $acc_add;
|
|
|
$mailBoxes = $this->getMailboxes();
|
|
|
-
|
|
|
- if(count($mailBoxes) >= $accountLimit && $accountLimit !== ProductParams::SIZE_UNLIMITED && 'editAccountForm' !== $this->getRequestValue('loadData'))
|
|
|
- {
|
|
|
- $this->setError('There are too many mailboxes');
|
|
|
- return false;
|
|
|
+ if(is_countable($mailBoxes)){
|
|
|
+ if(count($mailBoxes) >= $accountLimit && $accountLimit !== ProductParams::SIZE_UNLIMITED && 'editAccountForm' !== $this->getRequestValue('loadData'))
|
|
|
+ {
|
|
|
+ $this->setError('There are too many mailboxes');
|
|
|
+ return false;
|
|
|
+ }
|
|
|
}
|
|
|
-
|
|
|
/**
|
|
|
*
|
|
|
*/
|