diff --git a/typo3/sysext/scheduler/Classes/CronCommand/NormalizeCommand.php b/typo3/sysext/scheduler/Classes/CronCommand/NormalizeCommand.php index c304ad1ca05beda5367c3c702f8964997dbae0a4..c60f6d09cbd1971175688d02c9d3ffe3b2d11f07 100644 --- a/typo3/sysext/scheduler/Classes/CronCommand/NormalizeCommand.php +++ b/typo3/sysext/scheduler/Classes/CronCommand/NormalizeCommand.php @@ -182,6 +182,8 @@ class NormalizeCommand $fieldArray[] = self::convertRangeToListOfValues($listElement); } elseif (MathUtility::canBeInterpretedAsInteger($listElement)) { $fieldArray[] = $listElement; + } elseif (strlen($listElement) === 2 && $listElement{0} === '0') { + $fieldArray[] = (int)$listElement; } else { throw new \InvalidArgumentException('Unable to normalize integer field.', 1291429389); } diff --git a/typo3/sysext/scheduler/Tests/Unit/CronCommand/NormalizeCommandTest.php b/typo3/sysext/scheduler/Tests/Unit/CronCommand/NormalizeCommandTest.php index b9e58b59c9d8be367c52f8bdb4d337fb2ff03112..f43f27147c9550bdbab0cc02e82d791a2d90d446 100644 --- a/typo3/sysext/scheduler/Tests/Unit/CronCommand/NormalizeCommandTest.php +++ b/typo3/sysext/scheduler/Tests/Unit/CronCommand/NormalizeCommandTest.php @@ -53,7 +53,10 @@ class NormalizeCommandTest extends UnitTestCase '* * * * 1' => ['* * * * 1', '* * * * 1'], '0 0 * * 0' => ['0 0 * * 0', '0 0 * * 7'], '0 0 * * 7' => ['0 0 * * 7', '0 0 * * 7'], - '* * 1,2 * 1' => ['* * 1,2 * 1', '* * 1,2 * 1'] + '* * 1,2 * 1' => ['* * 1,2 * 1', '* * 1,2 * 1'], + '15 02 * * *' => ['15 02 * * *', '15 2 * * *'], + '08 02 * * *' => ['08 02 * * *', '8 2 * * *'], + '15 00 * * *' => ['15 00 * * *', '15 0 * * *'] ]; }