Normalize return value in Database->fetch

- Address https://github.com/friendica/friendica/issues/9250#issuecomment-741857058
This commit is contained in:
Hypolite Petovan 2020-12-10 06:12:10 -05:00
parent 675f54e44f
commit 99b200868b
2 changed files with 6 additions and 6 deletions

View file

@ -223,13 +223,14 @@ class Item
* Fetch a single item row
*
* @param mixed $stmt statement object
* @return array current row
* @return array|false current row or false
* @throws \Exception
*/
public static function fetch($stmt)
{
$row = DBA::fetch($stmt);
if (is_bool($row)) {
if (!is_array($row)) {
return $row;
}