1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-08-03 15:27:42 +02:00

[ticket/17330] Add try/catch block though it's not really needed

PHPBB-17330
This commit is contained in:
Marc Alexander
2024-06-06 20:21:39 +02:00
parent e813bd02c6
commit 35436f078c

View File

@@ -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'))
{
try
{ {
$web_push->setAutomaticPadding(self::MOZILLA_FALLBACK_PADDING); $web_push->setAutomaticPadding(self::MOZILLA_FALLBACK_PADDING);
} }
catch (\Exception)
{
// This shouldn't happen since we won't pass padding length outside limits
}
}
} }
} }