SERVER_NAME not in $_SERVER
-
Hi, one of my customers is using this plugin for his woocommerce website, and I noticed th logs fill up with this message:
Undefined array key “SERVER_NAME” in /wp-content/plugins/woosa-in3/woosa-in3.php on line 44
This message only appears when running wp-cli and makes sense, because in a cli environment this variable is not set.
However, since wp-cli is used extensively for maintenance purposes, it would be great if we can eliminate this warning message.
Perhaps something along these lines would fix the issue:
$_SERVER['SERVER_NAME'] ?: php_uname("n")
I hope you can fix this in the next update to avoid filling up my logfiles! ??
Regards,
RinckInfo: Ubuntu 18.04 LTS – PHP 8.0 – WordPress 5.8
- The topic ‘SERVER_NAME not in $_SERVER’ is closed to new replies.