aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Wallabag
diff options
context:
space:
mode:
authorJeremy Benoist <jeremy.benoist@gmail.com>2015-12-30 12:19:15 +0100
committerJeremy Benoist <jeremy.benoist@gmail.com>2016-01-02 23:27:41 +0100
commitb4b592a0c0ee356e81775baf8f9976288d7b686c (patch)
tree5938c378166e023adc5a62accf6d5831919b59c7 /src/Wallabag
parent77a7752a592af9ac821621a34d9955533baf40a0 (diff)
downloadwallabag-b4b592a0c0ee356e81775baf8f9976288d7b686c.tar.gz
wallabag-b4b592a0c0ee356e81775baf8f9976288d7b686c.tar.zst
wallabag-b4b592a0c0ee356e81775baf8f9976288d7b686c.zip
Fix the way to check for an existing entry
Instead of requiring more than 1 entry (> 1) we have to check for at least one entry (> 0)
Diffstat (limited to 'src/Wallabag')
-rw-r--r--src/Wallabag/CoreBundle/Repository/EntryRepository.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/Wallabag/CoreBundle/Repository/EntryRepository.php b/src/Wallabag/CoreBundle/Repository/EntryRepository.php
index b8e22eb8..c6763a40 100644
--- a/src/Wallabag/CoreBundle/Repository/EntryRepository.php
+++ b/src/Wallabag/CoreBundle/Repository/EntryRepository.php
@@ -242,8 +242,8 @@ class EntryRepository extends EntityRepository
242 ->getQuery() 242 ->getQuery()
243 ->getResult(); 243 ->getResult();
244 244
245 if (count($res) > 1) { 245 if (count($res)) {
246 return next($res); 246 return current($res);
247 } 247 }
248 248
249 return false; 249 return false;