mirror of
https://github.com/netzbegruenung/circles.git
synced 2024-05-04 12:53:41 +02:00
fixing stuff
Signed-off-by: Maxence Lange <maxence@artificial-owl.com>
This commit is contained in:
parent
bd517f19e1
commit
a3779358d8
|
@ -564,11 +564,11 @@ class CirclesService {
|
||||||
if ($limit === -1) {
|
if ($limit === -1) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if ($limit === 0) {
|
if ($limit === 0 || $limit === '' || $limit === null) {
|
||||||
$limit = $this->configService->getAppValue(ConfigService::CIRCLES_MEMBERS_LIMIT);
|
$limit = $this->configService->getAppValue(ConfigService::CIRCLES_MEMBERS_LIMIT);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (sizeof($members) >= $limit) {
|
if (sizeof($members) >= $limit) {
|
||||||
throw new MembersLimitException(
|
throw new MembersLimitException(
|
||||||
'This circle already reach its limit on the number of members'
|
'This circle already reach its limit on the number of members'
|
||||||
);
|
);
|
||||||
|
|
|
@ -702,6 +702,7 @@ class CirclesTest extends \PHPUnit_Framework_TestCase {
|
||||||
$member->getCircleId()
|
$member->getCircleId()
|
||||||
]
|
]
|
||||||
);
|
);
|
||||||
|
} catch (MemberDoesNotExistException $e) {
|
||||||
} catch (Exception $e) {
|
} catch (Exception $e) {
|
||||||
throw $e;
|
throw $e;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue