PHP Errors when running wpcron.php via Cronjob
-
Hello,
my server runs at PHP 8.1 now and since then I get these errors:
Warning: Undefined array key “HTTP_HOST” in /<path to wordpress>/wp-content/plugins/ip2location-country-blocker/ip2location-country-blocker.php on line 2960
Warning: Trying to access array offset on value of type bool in /<path to wordpress>//wp-content/plugins/ip2location-country-blocker/ip2location-country-blocker.php on line 2970
I am running wpcron.php via a cron job to avoid waiting for a visitor triggering the wordpress cronjobs (and I would like to keep that method). I guess because of this I get the errors ? (I had the same with a self written script). It help (at least for the HTTP_HOST) to check if value is set before using it.
wpcron.php is called with php /path/to/wpcron.php
Could you please have a look into it ? Thanks in a advance.
Dragon013
- The topic ‘PHP Errors when running wpcron.php via Cronjob’ is closed to new replies.