Fix Laravel Schedule Problem “Invalid argument supplied for foreach”

This tricks for who are getting an exception when executing laravel schedule task. The exception message looks like ‘ErrorException’ with message ‘Invalid argument supplied for foreach’. By little tricks, you can run your schedule task without any exception.

Use it :

php -d register_argc_argv=On public_html/artisan schedule:run 1>> /dev/null 2>&1

instead of:

php public_html/artisan schedule:run 1>> /dev/null 2>&1

 

 

Tags : , , , , ,

Share on :

Leave a Reply


3 + = four