]> git.immae.eu Git - github/wallabag/wallabag.git/commit - src/Wallabag/ImportBundle/Import/WallabagImport.php
Avoid breaking import when fetching fail 2224/head
authorJeremy Benoist <jeremy.benoist@gmail.com>
Fri, 19 Aug 2016 21:52:19 +0000 (23:52 +0200)
committerJeremy Benoist <jeremy.benoist@gmail.com>
Fri, 19 Aug 2016 23:17:26 +0000 (01:17 +0200)
commit19d9efab32b5c6403e9ee95fb70a2ce56a27f14b
tree325d2724ae5e5988b2ab77a33cf3f4cfe88c3647
parente408d7e895e784271a55c3a200666034db0af80a
Avoid breaking import when fetching fail

graby will throw an Exception in some case (like a bad url, a restricted url or a secured pdf).

Import doesn't handle that case and break the whole import.
With that commit the import isn't stopped but the entry is just skipped.

Also, as a  bonus, I've added extra test on WallabagImportV2 when the json is empty.
src/Wallabag/ImportBundle/Import/AbstractImport.php [new file with mode: 0644]
src/Wallabag/ImportBundle/Import/PocketImport.php
src/Wallabag/ImportBundle/Import/WallabagImport.php
tests/Wallabag/ImportBundle/Import/PocketImportTest.php
tests/Wallabag/ImportBundle/Import/WallabagV2ImportTest.php
tests/Wallabag/ImportBundle/fixtures/wallabag-v2-empty.json [new file with mode: 0644]