]> git.mxchange.org Git - friendica.git/commitdiff
Revert $term DB result check
authorPhilipp Holzer <admin+github@philipp.info>
Sat, 27 Jul 2019 13:34:08 +0000 (15:34 +0200)
committerPhilipp Holzer <admin+github@philipp.info>
Sat, 27 Jul 2019 21:54:14 +0000 (23:54 +0200)
include/api.php

index ee788775e53ea9698107e8e017afbd5ddc1a232f..404c1e45357fb985f0cdbe9f46c8e785ad106549 100644 (file)
@@ -6268,17 +6268,15 @@ function api_saved_searches_list($type)
        $terms = DBA::select('search', ['id', 'term'], ['uid' => local_user()]);
 
        $result = [];
-       if (DBA::isResult($terms)) {
-               while ($term = $terms->fetch()) {
-                       $result[] = [
-                               'created_at' => api_date(time()),
-                               'id'         => intval($term['id']),
-                               'id_str'     => $term['id'],
-                               'name'       => $term['term'],
-                               'position'   => null,
-                               'query'      => $term['term']
-                       ];
-               }
+       while ($term = $terms->fetch()) {
+               $result[] = [
+                       'created_at' => api_date(time()),
+                       'id' => intval($term['id']),
+                       'id_str' => $term['id'],
+                       'name' => $term['term'],
+                       'position' => null,
+                       'query' => $term['term']
+               ];
        }
 
        DBA::close($terms);