Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/Service/ColumnTypes/SelectionBusiness.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public function parseValue($value, Column $column): string {

foreach ($column->getSelectionOptionsArray() as $option) {
if ($option['id'] === $intValue) {
return json_encode($option['id']);
return json_encode((string)$option['id']);
}
}

Expand Down
6 changes: 3 additions & 3 deletions tests/unit/Service/ColumnTypes/SelectionBusinessTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,9 @@ public function setUp(): void {

public function parseValueProvider(): array {
return [
'valid integer value' => [2, '2'],
'valid string value' => ['2', '2'],
'valid string value for numeric option' => ['4', '4'],
'valid integer value' => [2, '"2"'],
'valid string value' => ['2', '"2"'],
'valid string value for numeric option' => ['4', '"4"'],
'invalid value' => [5, ''],
'null value' => [null, ''],
'empty string' => ['', ''],
Expand Down
Loading