Debug Errors in Version 1.5.9
-
Good Day!
Just wanted to let you know about the following errors:
PHP Notice: Undefined index: HTTP_USER_AGENT in /httpd/www/wp-content/plugins/feedpress/feedpress.php on line 803
PHP Notice: Undefined index: HTTP_USER_AGENT in /httpd/www/wp-content/plugins/feedpress/feedpress.php on line 804
PHP Notice: Undefined index: HTTP_USER_AGENT in /httpd/www/wp-content/plugins/feedpress/feedpress.php on line 805
PHP Notice: Undefined index: HTTP_USER_AGENT in /httpd/www/wp-content/plugins/feedpress/feedpress.php on line 806I think you should be able to resolve the error by capturing it in a variable and using the variable instead. Untested Example:
// Handle feed redirections $user_agent = isset($_SERVER['HTTP_USER_AGENT']) ? $_SERVER['HTTP_USER_AGENT'] : ''; if (!preg_match('/feedpress/i', $user_agent) && !preg_match('/uri\.lv/i', $user_agent) && !preg_match('/feedvalidator/i', $user_agent) && !preg_match('/googlebot/i', $user_agent)) { add_action('template_redirect', 'feedpress_redirect', 1); }
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘Debug Errors in Version 1.5.9’ is closed to new replies.