Skip to content

Commit

Permalink
Fix getLabelTranslationParameters (#8175)
Browse files Browse the repository at this point in the history
  • Loading branch information
VincentLanglet authored Apr 10, 2024
1 parent 8e37c8c commit 63f1108
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/Filter/Filter.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions tests/Filter/FilterTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down

0 comments on commit 63f1108

Please sign in to comment.