Browse Source

fix returned data type

PHP-GTK3
yggverse 4 months ago
parent
commit
f77375d14c
  1. 9
      src/Model/Database.php

9
src/Model/Database.php

@ -128,7 +128,7 @@ class Database
public function getBookmark( public function getBookmark(
?string $request = null ?string $request = null
): array ): ?object
{ {
$query = $this->_connection->prepare( $query = $this->_connection->prepare(
'SELECT * FROM `bookmark` WHERE `request` LIKE :request' 'SELECT * FROM `bookmark` WHERE `request` LIKE :request'
@ -140,7 +140,12 @@ class Database
] ]
); );
return $query->fetch(); if ($record = $query->fetch())
{
return $record;
}
return null;
} }
public function findBookmark( public function findBookmark(

Loading…
Cancel
Save