mirror of
https://github.com/friendica/friendica
synced 2025-04-27 14:30:11 +00:00
Ensure *toArray returns an array
This commit is contained in:
parent
b684fffcb7
commit
a61ce4fed0
3 changed files with 7 additions and 11 deletions
|
@ -383,16 +383,10 @@ class Item extends BaseObject
|
|||
$result = self::select($fields, $condition, $params);
|
||||
|
||||
if (is_bool($result)) {
|
||||
return $result;
|
||||
return [];
|
||||
}
|
||||
|
||||
$data = [];
|
||||
while ($row = self::fetch($result)) {
|
||||
$data[] = $row;
|
||||
}
|
||||
DBA::close($result);
|
||||
|
||||
return $data;
|
||||
return DBA::toArray($result);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue