[TYPO3-core] RFC #16321: Bug: Numeric zero for representation of weekday sunday is not accepted

Christian Kuhn lolli at schwarzbu.ch
Wed Nov 10 01:55:48 CET 2010


On 11/09/2010 11:05 PM, Marcus Krause wrote:
> Problem:
> Currently, the scheduler accepts single numeric values only for
> representation of weekdays. Lower bound and included is 1, upper bound
> and included in range is 7. 1 means Monday, 7 Sunday.
>
> However, even the currently reduced functionality is not fully
> compatible with an usual cron entry. Usually numeric zero is also
> allowed representing Sunday.
>
> Solution:
> Allow '0' for sunday.

+1 on reading.

Nitpick:
+ if (0 === strcmp($weekday, '0')) {

Please swap variable and constant.
This is a "Yoda condition": "If blue is the sky" :) [1]

Regards
Christian

[1] http://www.globalnerdy.com/2010/05/09/new-programming-jargon/


More information about the TYPO3-team-core mailing list