Support » Plugin: Geo Redirect » Notice: Undefined index: HTTP_REFERER

  • Hi.
    This looks like a great plugin, but when I installed it I very often get this error:

    Notice: Undefined index: HTTP_REFERER in ...../wp-content/plugins/geographical-redirect/geo-redirect.php on line 37

    Note: I run WordPress 5.0.3.

    I looked at that line and it says:
    $this->referer = $_SERVER['HTTP_REFERER'];

    In order to remove it I changed to:
    $this->referer = isset($_SERVER['HTTP_REFERER']) && !empty($_SERVER['HTTP_REFERER']) ? $_SERVER['HTTP_REFERER'] : '';

    I wanted to ask you if this change impacts other functionality.
    Otherwise, if you want and think it’s useful, you can add it in a next plugin update.

    Thank you for your answer.

  • The topic ‘Notice: Undefined index: HTTP_REFERER’ is closed to new replies.