Revert $term DB result check
This commit is contained in:
parent
37d03bbeae
commit
b7f1de1e64
|
@ -6268,17 +6268,15 @@ function api_saved_searches_list($type)
|
||||||
$terms = DBA::select('search', ['id', 'term'], ['uid' => local_user()]);
|
$terms = DBA::select('search', ['id', 'term'], ['uid' => local_user()]);
|
||||||
|
|
||||||
$result = [];
|
$result = [];
|
||||||
if (DBA::isResult($terms)) {
|
while ($term = $terms->fetch()) {
|
||||||
while ($term = $terms->fetch()) {
|
$result[] = [
|
||||||
$result[] = [
|
'created_at' => api_date(time()),
|
||||||
'created_at' => api_date(time()),
|
'id' => intval($term['id']),
|
||||||
'id' => intval($term['id']),
|
'id_str' => $term['id'],
|
||||||
'id_str' => $term['id'],
|
'name' => $term['term'],
|
||||||
'name' => $term['term'],
|
'position' => null,
|
||||||
'position' => null,
|
'query' => $term['term']
|
||||||
'query' => $term['term']
|
];
|
||||||
];
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
DBA::close($terms);
|
DBA::close($terms);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user