fixing stuff

Signed-off-by: Maxence Lange <maxence@artificial-owl.com>
This commit is contained in:
Maxence Lange 2018-08-01 10:36:05 -01:00
parent bd517f19e1
commit a3779358d8
2 changed files with 3 additions and 2 deletions

View File

@ -564,11 +564,11 @@ class CirclesService {
if ($limit === -1) {
return;
}
if ($limit === 0) {
if ($limit === 0 || $limit === '' || $limit === null) {
$limit = $this->configService->getAppValue(ConfigService::CIRCLES_MEMBERS_LIMIT);
}
if (sizeof($members) >= $limit) {
if (sizeof($members) >= $limit) {
throw new MembersLimitException(
'This circle already reach its limit on the number of members'
);

View File

@ -702,6 +702,7 @@ class CirclesTest extends \PHPUnit_Framework_TestCase {
$member->getCircleId()
]
);
} catch (MemberDoesNotExistException $e) {
} catch (Exception $e) {
throw $e;
}