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

Correction de la normalisation des filtres.

On perdait les clefs, ce qui rendait les filtres inopérants.
No related merge requests found
Showing with 9 additions and 1 deletion
+9 -1
......@@ -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;
......
Supports Markdown
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