mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-10 13:28:55 +00:00
[ticket/17330] Add try/catch block though it's not really needed
PHPBB-17330
This commit is contained in:
parent
e813bd02c6
commit
35436f078c
1 changed files with 8 additions and 2 deletions
|
@ -442,13 +442,19 @@ class webpush extends messenger_base implements extended_method_interface
|
||||||
* @param string $endpoint
|
* @param string $endpoint
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
* @throws \Exception
|
|
||||||
*/
|
*/
|
||||||
protected function set_endpoint_padding(\Minishlink\WebPush\WebPush $web_push, string $endpoint): void
|
protected function set_endpoint_padding(\Minishlink\WebPush\WebPush $web_push, string $endpoint): void
|
||||||
{
|
{
|
||||||
if (str_contains($endpoint, 'mozilla.com') || str_contains($endpoint, 'mozaws.net'))
|
if (str_contains($endpoint, 'mozilla.com') || str_contains($endpoint, 'mozaws.net'))
|
||||||
{
|
{
|
||||||
$web_push->setAutomaticPadding(self::MOZILLA_FALLBACK_PADDING);
|
try
|
||||||
|
{
|
||||||
|
$web_push->setAutomaticPadding(self::MOZILLA_FALLBACK_PADDING);
|
||||||
|
}
|
||||||
|
catch (\Exception)
|
||||||
|
{
|
||||||
|
// This shouldn't happen since we won't pass padding length outside limits
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue