Skip to content
This repository was archived by the owner on Sep 19, 2022. It is now read-only.

Commit 4176a75

Browse files
author
Dominik František Bučík
authored
Merge pull request #251 from dBucik/fix_aup_stricttypes
fix: 🐛 Fix default value in ForceAup due to strictypes
2 parents 631d422 + eb75544 commit 4176a75

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

lib/Auth/Process/ForceAup.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -323,6 +323,9 @@ private function mergeAupsToBeApproved(array $perunAupsToBeApproved, array $voAu
323323
*/
324324
private function parseDateTime(string $date, DateTime $default = null): DateTime
325325
{
326+
if (null === $default) {
327+
$default = DateTime::createFromFormat(self::DATETIME_FORMAT, '1970-01-01');
328+
}
326329
$result = DateTime::createFromFormat(self::DATETIME_FORMAT, $date);
327330
if (false === $result) {
328331
$result = $default;

0 commit comments

Comments
 (0)