]> git.immae.eu Git - github/wallabag/wallabag.git/blobdiff - src/Wallabag/ImportBundle/Import/WallabagImport.php
Fix error on EntityManager clear
[github/wallabag/wallabag.git] / src / Wallabag / ImportBundle / Import / WallabagImport.php
index a1cc085b3e12c14a8ba0ceaccbde48b7f5a3c0ea..9cd3dcb8bac7213118136503d64a799016de6cbb 100644 (file)
@@ -172,7 +172,10 @@ abstract class WallabagImport extends AbstractImport
             // flush every 20 entries
             if (($i % 20) === 0) {
                 $this->em->flush();
-                $this->em->clear($entry);
+
+                // clear only affected entities
+                $this->em->clear(Entry::class);
+                $this->em->clear(Tag::class);
             }
             ++$i;
         }