diff --git a/app/Services/PushService.php b/app/Services/PushService.php index 1fd50d1a3acd..238b3f2099a5 100644 --- a/app/Services/PushService.php +++ b/app/Services/PushService.php @@ -75,7 +75,7 @@ class PushService { $devices = json_decode($account->devices, true); - if (count($devices) >= 1) { + if (count((array) $devices) >= 1) { return true; } else { return false; diff --git a/tests/acceptance/APICest.php b/tests/acceptance/APICest.php index 63eb3a95e660..32867ac4ecdb 100644 --- a/tests/acceptance/APICest.php +++ b/tests/acceptance/APICest.php @@ -23,7 +23,7 @@ class APICest $response = $this->sendRequest('login', $data); $userAccounts = $response->data; - PHPUnit_Framework_Assert::assertGreaterThan(0, count($userAccounts)); + PHPUnit_Framework_Assert::assertGreaterThan(0, count((array) $userAccounts)); $userAccount = $userAccounts[0]; $this->token = $userAccount->token;