Hi Becc,
I have not seen this error on my development machine or any staging environment either. What is the address of the site so I can take a look at it?
I think I can check isset() in the code on those lines to check the variables. They should be there but maybe there are cases where they are not available. I will do that I can to test this out. If you have code to fix it, please submit it and I’ll test it out.
I have opened a GitHub issue to get to the bottom of this. Here it is for your reference:
https://github.com/rumspeed/simple-side-tab/issues/10
Thank you for using Simple Side Tab.
Thread Starter
Becc
(@superbecc)
Hey Scot, thanks for responding. Looking at it again, I’ve realised it’s only going to be a WP-CLI problem, so you may or may not want to do anything about it: sorry to have jumped the gun and gotten you concerned. It’s because it’s command line PHP I’m using (WP-CLI being a command line interface to WordPress); the $_SERVER array isn’t getting set because there is no web server invoking it. Hence the PHP notices on the command line as I attempt to perform updates using WP-CLI. I’ve found a few other reports of people using WP-CLI and having similar issues where the $_SERVER array is referenced, eg https://github.com/wp-cli/wp-cli/issues/1734 and https://github.com/wp-cli/wp-cli/issues/785#issuecomment-138040347
You’re right, checking isset() would solve them. When I wrapped everything in the rum_get_full_url() function with ‘if(isset($_SERVER[“SERVER_NAME”]))’, the notices ceased.
I’ll copy this reply over at the github issue for if you want to go ahead with the change you suggested, though totally understand if you don’t. Thanks again for getting back to me about it!
Thank you for the great follow up, Becc. I have implemented the change and it will be available on the next release. I’m planning on having it completed within the week. It’s currently fixed on GitHub on a branch but not rolled into master and tagged just yet.