From 4bdd133e5dd39b93dd0bb36c110c96b78ff16f27 Mon Sep 17 00:00:00 2001 From: Maxime Huran Date: Wed, 18 Sep 2024 11:09:07 +0200 Subject: [PATCH] Replace correctly min and max values --- src/Search/Request/RequestConfiguration.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Search/Request/RequestConfiguration.php b/src/Search/Request/RequestConfiguration.php index 526c9a0..aa379cb 100644 --- a/src/Search/Request/RequestConfiguration.php +++ b/src/Search/Request/RequestConfiguration.php @@ -101,8 +101,9 @@ public function manageRangeField(string $field): void $min = (float) $range['min']; $max = (float) $range['max']; if ($min > $max) { + $min = $range['min']; // Take the original value, not casted $range['min'] = $range['max']; - $range['max'] = $range['min']; + $range['max'] = $min; } }