Support » Fixing WordPress » Another Error Fix For: wp-content/plugins/google-h

  • 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) {

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Another Error Fix For: wp-content/plugins/google-h’ is closed to new replies.