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)
This commit is contained in:
Jeremy Benoist 2015-12-30 12:19:15 +01:00
parent 77a7752a59
commit b4b592a0c0

View file

@ -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;