From 5a4bbcc9a76fcdf54a6af25fcf7b26c9053a0ba3 Mon Sep 17 00:00:00 2001 From: Jeremy Benoist Date: Thu, 24 Dec 2015 15:19:50 +0100 Subject: Change the way to check for an existing entry The repository method return the entry found or false if nothing exists. --- src/Wallabag/ImportBundle/Import/PocketImport.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/Wallabag/ImportBundle/Import') diff --git a/src/Wallabag/ImportBundle/Import/PocketImport.php b/src/Wallabag/ImportBundle/Import/PocketImport.php index dd1c34ab..ef8f9eb5 100644 --- a/src/Wallabag/ImportBundle/Import/PocketImport.php +++ b/src/Wallabag/ImportBundle/Import/PocketImport.php @@ -117,9 +117,9 @@ class PocketImport implements ImportInterface $existingEntry = $this->em ->getRepository('WallabagCoreBundle:Entry') - ->findOneByUrlAndUserId($url, $this->user->getId()); + ->existByUrlAndUserId($url, $this->user->getId()); - if (count($existingEntry) > 0) { + if (false !== $existingEntry) { ++$this->skippedEntries; continue; } -- cgit v1.2.3