]> git.immae.eu Git - github/wallabag/wallabag.git/blobdiff - src/Wallabag/ImportBundle/Import/PocketImport.php
Fix error on EntityManager clear
[github/wallabag/wallabag.git] / src / Wallabag / ImportBundle / Import / PocketImport.php
index 798cfdaefe05cc0746340d8f21b2b8b38e2d616b..841f829d07614cf1e3adc7b9f3d457cce56b2bbd 100644 (file)
@@ -255,7 +255,10 @@ class PocketImport 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;
         }