Skip to content

Commit 98f0241

Browse files
committed
Update WebPush.php
1 parent c72fb71 commit 98f0241

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/WebPush.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -289,7 +289,7 @@ protected function prepare(array $notifications): array
289289
$headers['Topic'] = $options['topic'];
290290
}
291291

292-
if (array_key_exists('VAPID', $auth) && $contentEncoding) {
292+
if (array_key_exists('VAPID', $auth) && (null !== $contentEncoding && '' !== $contentEncoding)) {
293293
$audience = parse_url($endpoint, PHP_URL_SCHEME).'://'.parse_url($endpoint, PHP_URL_HOST);
294294
if (false === filter_var($audience, FILTER_VALIDATE_URL)) {
295295
throw new \ErrorException('Audience "'.$audience.'"" could not be generated.');

0 commit comments

Comments
 (0)