diff --git a/src/Wallabag/CoreBundle/Repository/EntryRepository.php b/src/Wallabag/CoreBundle/Repository/EntryRepository.php index b8e22eb83..c6763a40c 100644 --- a/src/Wallabag/CoreBundle/Repository/EntryRepository.php +++ b/src/Wallabag/CoreBundle/Repository/EntryRepository.php @@ -242,8 +242,8 @@ class EntryRepository extends EntityRepository ->getQuery() ->getResult(); - if (count($res) > 1) { - return next($res); + if (count($res)) { + return current($res); } return false;