PHP Warning: Undefined array key “REQUEST_METHOD”
-
Hello
I am running the latest WordPress on Apache 2.4 with PHP 8.1. I had the wordpress wp-cron.php file being called by a wget run by the host servers cron, with ‘DISABLE_WP_CRON’ set true in the wp-config.php file, this was working fine.
I then decided to run the wp-cron.php directly from the servers cron file with a line like ‘cd /var/www/site.tld/www; php /var/www/site.tld/www/wp-cron.php’ This runs the wp-cron.php but now I get a warning every time it runs
PHP Warning: Undefined array key “REQUEST_METHOD” in /var/www/site.tld/www/wp-content/plugins/pretty-link/app/controllers/PrliAppController.php on line 33
I guess this is something to do with not calling it via a http request, and running wp-cron.php like this is something of an edge case. Whilst this Warning is not a problem as such it is an irritation and puts unnecessary noise in the log files.
- The topic ‘PHP Warning: Undefined array key “REQUEST_METHOD”’ is closed to new replies.