|
@@ -223,9 +223,18 @@ class ElementRepository extends EntityRepository
|
223
|
223
|
$strict_element_ids[] = $strict_id['element_id'];
|
224
|
224
|
}
|
225
|
225
|
|
226
|
|
- $where_tag_strict = ($is_where) ? ' AND' : ' WHERE';
|
227
|
|
- $where_tag_strict .= ' e_.id IN (:tag_strict_ids)';
|
228
|
|
- $params_ids['tag_strict_ids'] = $strict_element_ids;
|
|
226
|
+ if (count($strict_element_ids))
|
|
227
|
+ {
|
|
228
|
+ $where_tag_strict = ($is_where) ? ' AND' : ' WHERE';
|
|
229
|
+ $where_tag_strict .= ' e_.id IN (:tag_strict_ids)';
|
|
230
|
+ $params_ids['tag_strict_ids'] = $strict_element_ids;
|
|
231
|
+ }
|
|
232
|
+ // Ce else palie au bug du au cas ou $strict_element_ids est egal a array();
|
|
233
|
+ else
|
|
234
|
+ {
|
|
235
|
+ $where_tag_strict = ($is_where) ? ' AND' : ' WHERE';
|
|
236
|
+ $where_tag_strict .= ' 1 = 2';
|
|
237
|
+ }
|
229
|
238
|
}
|
230
|
239
|
|
231
|
240
|
// Requête qui selectionnera les ids en fonction des critéres
|