From 1f25f9b3439a811b2350550efe1d8fbf908aa231 Mon Sep 17 00:00:00 2001 From: Tetragramat Date: Sat, 4 Feb 2023 22:53:22 +0100 Subject: [PATCH] WhatFailureGroupHandler catches failures in method close (#1791) --- src/Monolog/Handler/WhatFailureGroupHandler.php | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/Monolog/Handler/WhatFailureGroupHandler.php b/src/Monolog/Handler/WhatFailureGroupHandler.php index 2dd13672..b6d3d3b1 100644 --- a/src/Monolog/Handler/WhatFailureGroupHandler.php +++ b/src/Monolog/Handler/WhatFailureGroupHandler.php @@ -64,4 +64,18 @@ class WhatFailureGroupHandler extends GroupHandler } } } + + /** + * {@inheritDoc} + */ + public function close(): void + { + foreach ($this->handlers as $handler) { + try { + $handler->close(); + } catch (\Throwable $e) { + // What failure? + } + } + } }