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

Compatibility issue with PHP 8.2 #16

Closed applibs closed 1 year ago

applibs commented 1 year ago

Change function parseRange to this: Its impossible pass string $range with array.

private function parseRange(array &$register, int $index, string $range, int $stepping): void
    {
        if ($range === '*') {
            $rangeArr = [self::VALUE_BOUNDARIES[$index]['min'], self::VALUE_BOUNDARIES[$index]['max']];
        } else {
            $rangeArr = explode('-', $range);
        }

        $this->validateRange($rangeArr, $index);
        $this->fillRange($register, $index, $rangeArr, $stepping);
    }
poliander commented 1 year ago

Could you please give some more information on this? E.g.

applibs commented 1 year ago
poliander commented 1 year ago

Thank you, I understand now. I'll do a bugfix release very soon!