From d4504c39c645a53067e45d1fe9a0004c185bbf84 Mon Sep 17 00:00:00 2001 From: Art4 Date: Fri, 22 Nov 2024 10:53:26 +0000 Subject: [PATCH] remove confusing finally block --- src/Core/Lock/Type/DatabaseLock.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/Core/Lock/Type/DatabaseLock.php b/src/Core/Lock/Type/DatabaseLock.php index 9699522807..d05871689c 100644 --- a/src/Core/Lock/Type/DatabaseLock.php +++ b/src/Core/Lock/Type/DatabaseLock.php @@ -192,11 +192,12 @@ class DatabaseLock extends AbstractLock array_push($keys, $key['name']); } } catch (\Exception $exception) { - throw new LockPersistenceException(sprintf('Cannot get lock with prefix %s', $prefix), $exception); - } finally { $this->dba->close($stmt); + throw new LockPersistenceException(sprintf('Cannot get lock with prefix %s', $prefix), $exception); } + $this->dba->close($stmt); + return $keys; } }