Title: Debug Errors in Version 1.5.9
Last modified: August 21, 2016

---

# Debug Errors in Version 1.5.9

 *  Resolved [Jeremiah](https://wordpress.org/support/users/jprummer/)
 * (@jprummer)
 * [11 years, 8 months ago](https://wordpress.org/support/topic/debug-errors-in-version-159/)
 * 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 806
 * I 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);
   
       }
       ```
   
 * [https://wordpress.org/plugins/feedpress/](https://wordpress.org/plugins/feedpress/)

Viewing 3 replies - 1 through 3 (of 3 total)

 *  Plugin Author [maximevalette](https://wordpress.org/support/users/maximevalette/)
 * (@maximevalette)
 * [11 years, 8 months ago](https://wordpress.org/support/topic/debug-errors-in-version-159/#post-5159991)
 * Thanks for spotting that.
 * I’ve fixed it in the current version (I didn’t make a new version because we 
   don’t recommend having PHP with notices enabled in production so it’s probably
   not a major issue). I’m testing the UA variable in the statement to avoid preg_matches
   on an empty var.
 * Thanks again!
 *  Thread Starter [Jeremiah](https://wordpress.org/support/users/jprummer/)
 * (@jprummer)
 * [11 years, 8 months ago](https://wordpress.org/support/topic/debug-errors-in-version-159/#post-5160018)
 * You’re welcome, and thank you for the quick response. I’m just going through 
   a client’s site identifying and cleaning up debug log errors and thought I’d 
   let you know. Keep up the good work!
 *  Plugin Author [maximevalette](https://wordpress.org/support/users/maximevalette/)
 * (@maximevalette)
 * [11 years, 8 months ago](https://wordpress.org/support/topic/debug-errors-in-version-159/#post-5160019)
 * Thanks a lot!

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Debug Errors in Version 1.5.9’ is closed to new replies.

 * ![](https://ps.w.org/feedpress/assets/icon-256x256.png?rev=2318879)
 * [FeedPress](https://wordpress.org/plugins/feedpress/)
 * [Support Threads](https://wordpress.org/support/plugin/feedpress/)
 * [Active Topics](https://wordpress.org/support/plugin/feedpress/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/feedpress/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/feedpress/reviews/)

## Tags

 * [feedburner](https://wordpress.org/support/topic-tag/feedburner/)
 * [HTTP_USER_AGENT](https://wordpress.org/support/topic-tag/http_user_agent/)

 * 3 replies
 * 2 participants
 * Last reply from: [maximevalette](https://wordpress.org/support/users/maximevalette/)
 * Last activity: [11 years, 8 months ago](https://wordpress.org/support/topic/debug-errors-in-version-159/#post-5160019)
 * Status: resolved