Commit fb2ea549 authored by Julien Fastré's avatar Julien Fastré

fix error when querying with type

parent a69b2d7e
......@@ -128,9 +128,11 @@ class SingleTaskRepository extends \Doctrine\ORM\EntityRepository
$qb->setParameter('scope', $params['scope']);
}
if (\array_key_exists('types', $params)) {
$qb->andWhere($qb->expr()->in('st.type', ':types'));
$qb->setParameter('types', $params['types']);
if (\array_key_exists('types', $params) && $params['types'] !== NULL) {
if (count($params['types']) > 0) {
$qb->andWhere($qb->expr()->in('st.type', ':types'));
$qb->setParameter('types', $params['types']);
}
}
if (\array_key_exists('date_status', $params) and !empty($params['date_status'])) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment