]> git.mxchange.org Git - friendica.git/commitdiff
refactor confusing finally block
authorArt4 <art4@wlabs.de>
Fri, 22 Nov 2024 11:02:54 +0000 (11:02 +0000)
committerArt4 <art4@wlabs.de>
Fri, 22 Nov 2024 11:02:54 +0000 (11:02 +0000)
src/Core/PConfig/Repository/PConfig.php

index 0b47fad67dec76f816230f9f4bb326a011950162..d3b68b8ce1135c74a954971d927afd8f28c57989 100644 (file)
@@ -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;
        }