Skip to content

Commit

Permalink
Travis fix: Parameter must be an array or an object that implements C…
Browse files Browse the repository at this point in the history
…ountable
  • Loading branch information
Paul Radt committed Mar 13, 2018
1 parent 4d32a4e commit d9ce464
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion Service/FacebookMessengerService.php
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,12 @@ public function addMessageToBatch(Recipient $recipient, Message $message, $type
$this->logger->debug('Create new batch request');
}

$batchRequestCount = count($this->batchRequest->getRequests());
$batchRequestCount = 0;
$batchRequests = $this->batchRequest->getRequests();

if (is_array($batchRequests)) {
$batchRequestCount = count($batchRequests);
}

if ($batchRequestCount >= (self::MAX_BATCH_REQUESTS)) {
return false;
Expand Down

0 comments on commit d9ce464

Please sign in to comment.