diff options
Diffstat (limited to 'src/Wallabag')
-rw-r--r-- | src/Wallabag/CoreBundle/Controller/EntryController.php | 2 | ||||
-rw-r--r-- | src/Wallabag/CoreBundle/Repository/EntryRepository.php | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/src/Wallabag/CoreBundle/Controller/EntryController.php b/src/Wallabag/CoreBundle/Controller/EntryController.php index 445cfeeb..845ebef6 100644 --- a/src/Wallabag/CoreBundle/Controller/EntryController.php +++ b/src/Wallabag/CoreBundle/Controller/EntryController.php | |||
@@ -195,7 +195,7 @@ class EntryController extends Controller | |||
195 | public function showUnreadAction(Request $request, $page) | 195 | public function showUnreadAction(Request $request, $page) |
196 | { | 196 | { |
197 | // load the quickstart if no entry in database | 197 | // load the quickstart if no entry in database |
198 | if ($page === 1 && $this->get('wallabag_core.entry_repository')->countAllEntriesByUser($this->getUser()->getId()) === 0) { | 198 | if ((int) $page === 1 && $this->get('wallabag_core.entry_repository')->countAllEntriesByUser($this->getUser()->getId()) === 0) { |
199 | return $this->redirect($this->generateUrl('quickstart')); | 199 | return $this->redirect($this->generateUrl('quickstart')); |
200 | } | 200 | } |
201 | 201 | ||
diff --git a/src/Wallabag/CoreBundle/Repository/EntryRepository.php b/src/Wallabag/CoreBundle/Repository/EntryRepository.php index a65bfe3b..c27ee90c 100644 --- a/src/Wallabag/CoreBundle/Repository/EntryRepository.php +++ b/src/Wallabag/CoreBundle/Repository/EntryRepository.php | |||
@@ -325,7 +325,7 @@ class EntryRepository extends EntityRepository | |||
325 | ->where('e.user=:userId')->setParameter('userId', $userId) | 325 | ->where('e.user=:userId')->setParameter('userId', $userId) |
326 | ; | 326 | ; |
327 | 327 | ||
328 | return $qb->getQuery()->getSingleScalarResult(); | 328 | return (int) $qb->getQuery()->getSingleScalarResult(); |
329 | } | 329 | } |
330 | 330 | ||
331 | /** | 331 | /** |
@@ -345,7 +345,7 @@ class EntryRepository extends EntityRepository | |||
345 | ->andWhere('t.id=:tagId')->setParameter('tagId', $tagId) | 345 | ->andWhere('t.id=:tagId')->setParameter('tagId', $tagId) |
346 | ; | 346 | ; |
347 | 347 | ||
348 | return $qb->getQuery()->getSingleScalarResult(); | 348 | return (int) $qb->getQuery()->getSingleScalarResult(); |
349 | } | 349 | } |
350 | 350 | ||
351 | /** | 351 | /** |