From e5229df278ae402660010079d41f2bb7e5bd85b2 Mon Sep 17 00:00:00 2001 From: Vincent Langlet Date: Wed, 10 Apr 2024 21:20:25 +0200 Subject: [PATCH 1/2] Fix --- src/Filter/Filter.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Filter/Filter.php b/src/Filter/Filter.php index 4231947f87..05cce37744 100644 --- a/src/Filter/Filter.php +++ b/src/Filter/Filter.php @@ -258,7 +258,7 @@ final public function showFilter(): ?bool */ final public function getLabelTranslationParameters(): array { - return $this->getOption('label_translation_parameters'); + return $this->getOption('label_translation_parameters', []); } final public function withAdvancedFilter(): bool From e92cc9b856cc9279e9e71887de9edd18a23c44eb Mon Sep 17 00:00:00 2001 From: Vincent Langlet Date: Wed, 10 Apr 2024 21:21:56 +0200 Subject: [PATCH 2/2] Add test --- tests/Filter/FilterTest.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/Filter/FilterTest.php b/tests/Filter/FilterTest.php index 08c272369a..f00cc83c48 100644 --- a/tests/Filter/FilterTest.php +++ b/tests/Filter/FilterTest.php @@ -27,6 +27,8 @@ public function testFilter(): void static::assertSame(TextType::class, $filter->getFieldType()); static::assertSame([], $filter->getFieldOptions()); static::assertNull($filter->getLabel()); + static::assertNull($filter->getTranslationDomain()); + static::assertSame([], $filter->getLabelTranslationParameters()); $options = [ 'label' => 'foo',