From: Sébastien Viande Date: Mon, 25 Sep 2017 17:34:42 +0000 (+0200) Subject: Fix #3361 check type for tags in entry repository X-Git-Tag: 2.3.0~31^2~3^2~3 X-Git-Url: https://git.immae.eu/?a=commitdiff_plain;h=fafdf1711705fd11a370ae65bfe2278a8fb788f2;p=github%2Fwallabag%2Fwallabag.git Fix #3361 check type for tags in entry repository Check is $tags is a string before explode --- diff --git a/src/Wallabag/CoreBundle/Repository/EntryRepository.php b/src/Wallabag/CoreBundle/Repository/EntryRepository.php index 05f0e0ba..b5e35eff 100644 --- a/src/Wallabag/CoreBundle/Repository/EntryRepository.php +++ b/src/Wallabag/CoreBundle/Repository/EntryRepository.php @@ -151,7 +151,7 @@ class EntryRepository extends EntityRepository $qb->andWhere('e.updatedAt > :since')->setParameter('since', new \DateTime(date('Y-m-d H:i:s', $since))); } - if ('' !== $tags) { + if (is_string($tags) && '' !== $tags) { foreach (explode(',', $tags) as $i => $tag) { $entryAlias = 'e' . $i; $tagAlias = 't' . $i;