diff options
author | Jérémy Benoist <j0k3r@users.noreply.github.com> | 2019-01-04 11:06:53 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-01-04 11:06:53 +0100 |
commit | 8f5c4b083ccf354e7942b4f50626de945d29aad7 (patch) | |
tree | 7b10762300382a803c711c465eea42d2c2f2b80b /src/Wallabag/ImportBundle/Consumer/AbstractConsumer.php | |
parent | 2378fd6347dd1a824c8e1f4f7c3892c6eccddc85 (diff) | |
parent | 9f8f188d928b47503d39348c5990379a572b570a (diff) | |
download | wallabag-8f5c4b083ccf354e7942b4f50626de945d29aad7.tar.gz wallabag-8f5c4b083ccf354e7942b4f50626de945d29aad7.tar.zst wallabag-8f5c4b083ccf354e7942b4f50626de945d29aad7.zip |
Merge pull request #3816 from wallabag/validate-import-entry
Validate imported entry to avoid error on import
Diffstat (limited to 'src/Wallabag/ImportBundle/Consumer/AbstractConsumer.php')
-rw-r--r-- | src/Wallabag/ImportBundle/Consumer/AbstractConsumer.php | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/Wallabag/ImportBundle/Consumer/AbstractConsumer.php b/src/Wallabag/ImportBundle/Consumer/AbstractConsumer.php index b035f5cc..e4bfbdf0 100644 --- a/src/Wallabag/ImportBundle/Consumer/AbstractConsumer.php +++ b/src/Wallabag/ImportBundle/Consumer/AbstractConsumer.php | |||
@@ -52,6 +52,13 @@ abstract class AbstractConsumer | |||
52 | 52 | ||
53 | $this->import->setUser($user); | 53 | $this->import->setUser($user); |
54 | 54 | ||
55 | if (false === $this->import->validateEntry($storedEntry)) { | ||
56 | $this->logger->warning('Entry is invalid', ['entry' => $storedEntry]); | ||
57 | |||
58 | // return true to skip message | ||
59 | return true; | ||
60 | } | ||
61 | |||
55 | $entry = $this->import->parseEntry($storedEntry); | 62 | $entry = $this->import->parseEntry($storedEntry); |
56 | 63 | ||
57 | if (null === $entry) { | 64 | if (null === $entry) { |