From 4d421d2bbbcf259b001302427cd68942bca0eaeb Mon Sep 17 00:00:00 2001 From: Sarjuuk Date: Sat, 18 Oct 2025 16:46:25 +0200 Subject: [PATCH] Filter/Errors * handle stat weights quirk, analogous to the criteria quirk --- includes/components/filter.class.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/includes/components/filter.class.php b/includes/components/filter.class.php index eb79af3d..27746d05 100644 --- a/includes/components/filter.class.php +++ b/includes/components/filter.class.php @@ -299,6 +299,10 @@ abstract class Filter if (($this->rawData['cr'] ?? null) === [''] && !isset($this->rawData['crs']) && !isset($this->rawData['crv'])) unset($this->rawData['cr']); // unset or Filter::checkInput() screams bloody error + // same for stat weights on ItemListFilter + if ($this instanceof ItemListFilter && ($this->rawData['wt'] ?? null) === [''] && !isset($this->rawData['wtv'])) + unset($this->rawData['wt']); + $cleanupCr = []; foreach (static::$inputFields as $inp => [$type, $valid, $asArray]) {