Skip to content
Open
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
4 changes: 3 additions & 1 deletion framework/helpers/BaseArrayHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,9 @@
if (is_array($object)) {
if ($recursive) {
foreach ($object as $key => $value) {
if (is_array($value) || is_object($value)) {
if ($value instanceof \UnitEnum) {
$object[$key] = $value->value;

Check warning on line 68 in framework/helpers/BaseArrayHelper.php

View check run for this annotation

Codecov / codecov/patch

framework/helpers/BaseArrayHelper.php#L68

Added line #L68 was not covered by tests
} elseif (is_array($value) || is_object($value)) {
$object[$key] = static::toArray($value, $properties, true);
}
}
Expand Down