Commit 839cbfc4 authored by Guillaume Perréal's avatar Guillaume Perréal

Correction de la normalisation des filtres.

On perdait les clefs, ce qui rendait les filtres inopérants.
parent dc25b7e4
......@@ -80,16 +80,24 @@ class ClassFilterBuilder
}
if (is_array($data)) {
$res = [];
$isList = true;
foreach($data as $k => $v) {
$normalized = $this->normalize($v);
if (!empty($normalized)) {
$res[$k] = $normalized;
if (!is_int($k)) {
$isList = false;
}
}
}
if (empty($res)) {
return null;
}
sort($res);
if ($isList) {
sort($res);
} else {
ksort($res);
}
return $res;
}
return $data;
......
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