We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c72fb71 commit 98f0241Copy full SHA for 98f0241
src/WebPush.php
@@ -289,7 +289,7 @@ protected function prepare(array $notifications): array
289
$headers['Topic'] = $options['topic'];
290
}
291
292
- if (array_key_exists('VAPID', $auth) && $contentEncoding) {
+ if (array_key_exists('VAPID', $auth) && (null !== $contentEncoding && '' !== $contentEncoding)) {
293
$audience = parse_url($endpoint, PHP_URL_SCHEME).'://'.parse_url($endpoint, PHP_URL_HOST);
294
if (false === filter_var($audience, FILTER_VALIDATE_URL)) {
295
throw new \ErrorException('Audience "'.$audience.'"" could not be generated.');
0 commit comments