• Resolved Jeremiah

    (@jprummer)


    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://www.ads-software.com/plugins/feedpress/

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author maximevalette

    (@maximevalette)

    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

    (@jprummer)

    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

    (@maximevalette)

    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.