poliander / cron

Parse and validate crontab expressions in PHP
https://github.com/poliander/cron
GNU General Public License v3.0
63 stars 10 forks source link

Support for integers starting with zero #22

Closed FrKevin closed 11 months ago

FrKevin commented 12 months ago

Hi there,

I found a bug with cron: 0-30/2 02,06-19 5-30/5 1-11 1-2,4-5.

In fact this is a valid cron, but the ìsValidî method sends false.

I think I have found the origin of this error: image

Here we are comparing 2 and 02.

But 02 = 2 is an integer.

poliander commented 12 months ago

Will look into it, thank you for reporting!

poliander commented 11 months ago

Fixed in v2.4.9 and v3.0.7