Skip to content

Commit

Permalink
doesn't need to be split
Browse files Browse the repository at this point in the history
  • Loading branch information
duncanmcclean committed May 18, 2024
1 parent cd71972 commit 31dac5d
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions src/Http/Controllers/GuestEntryController.php
Original file line number Diff line number Diff line change
Expand Up @@ -215,16 +215,12 @@ protected function processField(Field $field, $key, $value, $request): mixed
$value = $this->uploadFile($key, $field, $request);
}

if (
$value
&& $field
&& $field->fieldtype() instanceof DateFieldtype
) {
if ($value && $field && $field->fieldtype() instanceof DateFieldtype) {
$format = $field->fieldtype()->config(
'format',
strlen($value) > 10 ? $field->fieldtype()::DEFAULT_DATETIME_FORMAT : $field->fieldtype()::DEFAULT_DATE_FORMAT
);

$value = Carbon::parse($value)->format($format);
}

Expand Down

0 comments on commit 31dac5d

Please sign in to comment.