Undefined Index: SCRIPT_NAME

Which PHP

A WordPress plugin on one of my client’s sites was filling up the error log with a PHP error “undefined index” for the server variable SCRIPT_NAME. The error persisted through a number of plugin updates. I found that I could work around it by editing the plugin’s code and substituting the server variable PHP_SELF instead of SCRIPT_NAME, but it was a hassle to modify the code for the plugin every time there was an update, and I wanted to find a permanent fix.

Continue reading “Undefined Index: SCRIPT_NAME”