Skip to content

Commit

Permalink
Fix a potential error in the Formatter if the provided value with CSV…
Browse files Browse the repository at this point in the history
… config is already an array
  • Loading branch information
qzminski committed Aug 7, 2024
1 parent b9e784d commit 654fca3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Formatter.php
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ public function dcaValueFromArray(array $fieldConfig, mixed $value, DataContaine
}
}

if (isset($fieldConfig['eval']['csv']) && str_contains((string) $value, (string) $fieldConfig['eval']['csv'])) {
if (isset($fieldConfig['eval']['csv']) && !is_array($value) && str_contains((string) $value, (string) $fieldConfig['eval']['csv'])) {
$value = explode($fieldConfig['eval']['csv'], (string) $value);
}

Expand Down

0 comments on commit 654fca3

Please sign in to comment.