yohang / CalendR

The missing PHP 5.3+ calendar management library.
http:/yohan.giarel.li/CalendR
MIT License
465 stars 65 forks source link

Sprintf is missing argument in PeriodAbstract #31

Closed boskee closed 10 years ago

boskee commented 10 years ago

sprintf in PeriodAbstract::__construct is missing an argument and thus breaks if $firstWeekday is out of bounds. Additionally, the message implies that 6 == Friday which isn't true. It should be:

                sprintf('"%s" is not a valid day. Days are between 0 (Sunday) and 6 (Saturday)', $firstWeekday)