mirror of
https://git.sekbaer.de/Friendica/friendica.git
synced 2025-06-11 09:34:26 +02:00
return previous value if database should throw exceptions
This commit is contained in:
parent
e4a93fc9c7
commit
59ee2f34e7
2 changed files with 12 additions and 3 deletions
|
@ -32,12 +32,12 @@ final class UserDeletedRepository
|
|||
*/
|
||||
public function insertByUsername(string $username): void
|
||||
{
|
||||
$this->database->throwExceptionsOnErrors(true);
|
||||
$throw = $this->database->throwExceptionsOnErrors(true);
|
||||
|
||||
try {
|
||||
$this->database->insert('userd', ['username' => $username]);
|
||||
} finally {
|
||||
$this->database->throwExceptionsOnErrors(false);
|
||||
$this->database->throwExceptionsOnErrors($throw);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue