PHP 7.2 fixes

This commit is contained in:
Hillel Coren 2018-02-27 10:41:07 +02:00
parent 4492ea07e5
commit f1c350419d
2 changed files with 2 additions and 2 deletions

View File

@ -75,7 +75,7 @@ class PushService
{ {
$devices = json_decode($account->devices, true); $devices = json_decode($account->devices, true);
if (count($devices) >= 1) { if (count((array) $devices) >= 1) {
return true; return true;
} else { } else {
return false; return false;

View File

@ -23,7 +23,7 @@ class APICest
$response = $this->sendRequest('login', $data); $response = $this->sendRequest('login', $data);
$userAccounts = $response->data; $userAccounts = $response->data;
PHPUnit_Framework_Assert::assertGreaterThan(0, count($userAccounts)); PHPUnit_Framework_Assert::assertGreaterThan(0, count((array) $userAccounts));
$userAccount = $userAccounts[0]; $userAccount = $userAccounts[0];
$this->token = $userAccount->token; $this->token = $userAccount->token;