From: Art4 Date: Fri, 22 Nov 2024 11:02:54 +0000 (+0000) Subject: refactor confusing finally block X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=bc76f2af67cc47c889a182ce86a3d03973be507c;p=friendica.git refactor confusing finally block --- diff --git a/src/Core/PConfig/Repository/PConfig.php b/src/Core/PConfig/Repository/PConfig.php index 0b47fad67d..d3b68b8ce1 100644 --- a/src/Core/PConfig/Repository/PConfig.php +++ b/src/Core/PConfig/Repository/PConfig.php @@ -75,11 +75,12 @@ class PConfig } } } catch (\Exception $exception) { - throw new PConfigPersistenceException(sprintf('Cannot load config category "%s" for user %d', $cat, $uid), $exception); - } finally { $this->db->close($configs); + throw new PConfigPersistenceException(sprintf('Cannot load config category "%s" for user %d', $cat, $uid), $exception); } + $this->db->close($configs); + return $return; }