mirror of
https://github.com/friendica/friendica
synced 2025-05-08 11:04:10 +02:00
Apply suggestions from code review
Co-authored-by: Hypolite Petovan <hypolite@mrpetovan.com>
This commit is contained in:
parent
965caf98a5
commit
925c30280c
3 changed files with 9 additions and 11 deletions
|
@ -104,9 +104,7 @@ class DBKeyValueStorage extends AbstractKeyValueStorage
|
|||
public function offsetUnset($offset)
|
||||
{
|
||||
try {
|
||||
$return = $this->database->delete(self::DB_KEY_VALUE_TABLE, ['k' => $offset]);
|
||||
|
||||
if (!$return) {
|
||||
if (!$this->database->delete(self::DB_KEY_VALUE_TABLE, ['k' => $offset])) {
|
||||
throw new \Exception(sprintf('database deletion failed: %s', $this->database->errorMessage()));
|
||||
}
|
||||
} catch (\Exception $exception) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue