]> git.immae.eu Git - github/wallabag/wallabag.git/commitdiff
GET /api/entries returns object, no more array
authorNicolas Lœuillet <nicolas@loeuillet.org>
Tue, 10 Feb 2015 05:44:38 +0000 (06:44 +0100)
committerNicolas Lœuillet <nicolas@loeuillet.org>
Tue, 10 Feb 2015 05:44:38 +0000 (06:44 +0100)
src/Wallabag/CoreBundle/Controller/WallabagRestController.php
src/Wallabag/CoreBundle/Repository/EntryRepository.php

index c298d84959ccee911d27f171581072cd354e2fd9..ab2c1181c11659c0653655b7df0eda4bf7bcf0e1 100644 (file)
@@ -45,7 +45,7 @@ class WallabagRestController extends Controller
             ->getRepository('WallabagCoreBundle:Entry')
             ->findEntries(1, $isArchived, $isStarred, $isDeleted, $sort, $order);
 
-        if (!is_array($entries)) {
+        if (is_null($entries)) {
             throw $this->createNotFoundException();
         }
 
index 5ae1337a8ca44faecc9891fc2c6265e0bf7e6f09..a33d698d847e76ea67192b8dcec78c53aa6686cf 100644 (file)
@@ -126,6 +126,6 @@ class EntryRepository extends EntityRepository
 
         return $qb
             ->getQuery()
-            ->getResult(Query::HYDRATE_ARRAY);
+            ->getResult();
     }
 }