From a3779358d80c6dedf43e717cbc956b3dffff63b2 Mon Sep 17 00:00:00 2001 From: Maxence Lange Date: Wed, 1 Aug 2018 10:36:05 -0100 Subject: [PATCH] fixing stuff Signed-off-by: Maxence Lange --- lib/Service/CirclesService.php | 4 ++-- tests/unit/lib/Api/CirclesTest.php | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/Service/CirclesService.php b/lib/Service/CirclesService.php index 129329d7..2ecf9b09 100644 --- a/lib/Service/CirclesService.php +++ b/lib/Service/CirclesService.php @@ -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' ); diff --git a/tests/unit/lib/Api/CirclesTest.php b/tests/unit/lib/Api/CirclesTest.php index b47165a9..c543c43f 100644 --- a/tests/unit/lib/Api/CirclesTest.php +++ b/tests/unit/lib/Api/CirclesTest.php @@ -702,6 +702,7 @@ class CirclesTest extends \PHPUnit_Framework_TestCase { $member->getCircleId() ] ); + } catch (MemberDoesNotExistException $e) { } catch (Exception $e) { throw $e; }