WordPress.org

Ready to get started?Download WordPress

Forums

Another Error Fix For: wp-content/plugins/google-h (2 posts)

  1. Joseph Scott
    Member
    Posted 10 years ago #

    Sorry, there was a second error in wp-content/plugins/google-hilite.php that I forgot to mention in the last post. In the function is_referer_search_engine the variable $_SERVER['HTTP_REFERER'] is being used even if it is undefined. The causes the following error:

    Undefined index: HTTP_REFERER

    A simple fix would be to simply add a check to see if HTTP_REFERER is defined so the new code would look like:

    function is_referer_search_engine($engine = 'google') {
    $siteurl = get_settings('home');
    if( empty($_SERVER['HTTP_REFERER']) ) {
    return 0;
    }
    $referer = urldecode($_SERVER['HTTP_REFERER']);
    //echo "referer is: $referer
    ";
    if ( ! $engine ) {
    return 0;
    }
    switch ($engine) {

  2. Ryan Boren
    WordPress Dev
    Posted 10 years ago #

    Thanks. Committed to CVS HEAD.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.