Skip to content

Commit

Permalink
Fix type errors in log calls
Browse files Browse the repository at this point in the history
Looks like these calls to Pusher::log() didn't get updated after #305
changed the method signature to require an array in the second param.
  • Loading branch information
braindawg committed Oct 31, 2024
1 parent 0c5fee7 commit 6541ecb
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Pusher.php
Original file line number Diff line number Diff line change
Expand Up @@ -996,7 +996,7 @@ public function webhook(array $headers, string $body): object
try {
$decoded_json = json_decode($body, false, 512, JSON_THROW_ON_ERROR);
} catch (\JsonException $e) {
$this->log('Unable to decrypt webhook event payload.', null, LogLevel::WARNING);
$this->log('Unable to decrypt webhook event payload.', [], LogLevel::WARNING);
throw new PusherException('Data encoding error.');
}

Expand All @@ -1006,12 +1006,12 @@ public function webhook(array $headers, string $body): object
$decryptedEvent = $this->crypto->decrypt_event($event);

if ($decryptedEvent === false) {
$this->log('Unable to decrypt webhook event payload. Wrong key? Ignoring.', null, LogLevel::WARNING);
$this->log('Unable to decrypt webhook event payload. Wrong key? Ignoring.', [], LogLevel::WARNING);
continue;
}
$decoded_events[] = $decryptedEvent;
} else {
$this->log('Got an encrypted webhook event payload, but no master key specified. Ignoring.', null, LogLevel::WARNING);
$this->log('Got an encrypted webhook event payload, but no master key specified. Ignoring.', [], LogLevel::WARNING);
}
} else {
$decoded_events[] = $event;
Expand Down

0 comments on commit 6541ecb

Please sign in to comment.