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:
Julien Fastré 2025-04-25 14:38:32 +02:00
parent e933f3e781
commit abdfe49c33
Signed by: julienfastre
GPG Key ID: BDE2190974723FCB

View File

@ -113,7 +113,7 @@ class SavedExportOptionsMigrator
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;
return (new RollingDate(