mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-07 20:08:53 +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
|
||||
*
|
||||
* @return void
|
||||
* @throws \Exception
|
||||
*/
|
||||
protected function set_endpoint_padding(\Minishlink\WebPush\WebPush $web_push, string $endpoint): void
|
||||
{
|
||||
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