Undefined array key “SCRIPT_FILENAME”
-
Hello,
I have my WP Cron executed using PHP rather than the web server, and this causes the following warning in PHP 8.1:
Undefined array key “SCRIPT_FILENAME” in /tablepress/classes/class-tablepress.php on line 110
The problem is: ‘wp-login.php’ === basename( $_SERVER[‘SCRIPT_FILENAME’] )
The code there already checks for DOING_CRON, but that check occurs AFTER the check against the _SERVER[‘SCRIPT_FILENAME’]
This can be fixed simply by re-ordering the “or” conditions to check for CRON and XMLRPC first, and then for wp-login.php.
Thanks,
Kevin Hock
Viewing 5 replies - 1 through 5 (of 5 total)
Viewing 5 replies - 1 through 5 (of 5 total)
- The topic ‘Undefined array key “SCRIPT_FILENAME”’ is closed to new replies.