Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error: foreach() argument must be of type array|object, bool given #134

Closed
lazka opened this issue Jan 17, 2022 · 2 comments
Closed

error: foreach() argument must be of type array|object, bool given #134

lazka opened this issue Jan 17, 2022 · 2 comments

Comments

@lazka
Copy link

lazka commented Jan 17, 2022

Starting with a recent update the following fails:

$cron = new CronExpression('0 0 1 1 *');
$cron->getPreviousRunDate(new \DateTimeImmutable('2021-09-07T09:36:00Z'));
foreach() argument must be of type array|object, bool given

vendor/dragonmantank/cron-expression/src/Cron/HoursField.php:100
vendor/dragonmantank/cron-expression/src/Cron/HoursField.php:52
vendor/dragonmantank/cron-expression/src/Cron/CronExpression.php:515
vendor/dragonmantank/cron-expression/src/Cron/CronExpression.php:298

It worked with v3.2.0 and fails with v3.2.1. Tested with PHP 7.3-8.1

@dragonmantank
Copy link
Owner

This should be fixed in v3.3.1, which is going out in just a few minutes. Thanks!

@lazka
Copy link
Author

lazka commented Jan 18, 2022

Thank you! 🙏

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants