mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-07 18:44:08 +00:00
Fix fixedDate logic to handle empty string check
Previously, the `fixedDate` logic did not account for empty strings, which could lead to unexpected behavior. This change ensures that `fixedDate` is validated for both null and empty string values before processing.
This commit is contained in:
parent
e933f3e781
commit
abdfe49c33
@ -113,7 +113,7 @@ class SavedExportOptionsMigrator
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
$fixedDate = null !== ($formData['fixedDate'] ?? null) ?
|
$fixedDate = null !== ($formData['fixedDate'] ?? null) && "" !== $formData['fixedDate'] ?
|
||||||
\DateTimeImmutable::createFromFormat('Y-m-d H:i:s', sprintf('%s 00:00:00', $formData['fixedDate']), new \DateTimeZone(date_default_timezone_get())) : null;
|
\DateTimeImmutable::createFromFormat('Y-m-d H:i:s', sprintf('%s 00:00:00', $formData['fixedDate']), new \DateTimeZone(date_default_timezone_get())) : null;
|
||||||
|
|
||||||
return (new RollingDate(
|
return (new RollingDate(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user