Skip to content

Commit

Permalink
fix trying to access offset 0 on type null (#99)
Browse files Browse the repository at this point in the history
  • Loading branch information
apreiml authored Jun 22, 2020
1 parent 8644afe commit 3f08a5c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/FacebookDriver.php
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ class FacebookDriver extends HttpDriver implements VerifiesService
public function buildPayload(Request $request)
{
$this->payload = new ParameterBag((array) json_decode($request->getContent(), true));
$this->event = Collection::make((array) $this->payload->get('entry')[0]);
$this->event = Collection::make((array) $this->payload->get('entry', [null])[0]);
$this->signature = $request->headers->get('X_HUB_SIGNATURE', '');
$this->content = $request->getContent();
$this->config = Collection::make($this->config->get('facebook', []));
Expand Down

0 comments on commit 3f08a5c

Please sign in to comment.