Blank User-Agent Causes PHP Notices
-
Hey there!
First off I want to say great plugin!
Because we do development, we run WP_DEBUG with error display turned off and logging turned on, 24/7 on some of our sites.
Whenever the user agent is not defined the following notice shows up in our debug.log:
PHP Notice: Undefined index: HTTP_USER_AGENT in /XXXXXXX/wp-content/plugins/mailchimp-for-wp/includes/integrations/class-integration.php on line 60
Would you guys mind just adding a check such as
if ( !empty( $_SERVER['HTTP_USER_AGENT'] ) )
to validate the$_SERVER['HTTP_USER_AGENT']
variable so those errors don’t show up in the logs? Thanks!– Scott
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
- The topic ‘Blank User-Agent Causes PHP Notices’ is closed to new replies.