Skip to content

Commit

Permalink
fix(abstract-selectable): add check for is_object before calling `m…
Browse files Browse the repository at this point in the history
…ethod_exists` on potential integer value
  • Loading branch information
JoelAlphonso committed Mar 13, 2024
1 parent f7e1666 commit 42876e3
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ protected function parseChoiceVal($value)
$value = $value->format('Y-m-d-H:i');
}

if (method_exists($value, '__toString')) {
if (is_object($value) && method_exists($value, '__toString')) {
$value = strval($value);
}

Expand Down

0 comments on commit 42876e3

Please sign in to comment.