Title: undefined array key &#8220;HTTP_REFERER&#8221; in&#8230;
Last modified: April 3, 2024

---

# undefined array key “HTTP_REFERER” in…

 *  [hemligg](https://wordpress.org/support/users/hemligg/)
 * (@hemligg)
 * [2 years ago](https://wordpress.org/support/topic/undefined-array-key-http_referer-in/)
 * We see a lot of “undefined array key “HTTP_REFERER” in” in our error log. Just
   a php warnings but should be a quick fix for you to just wrap $_SERVER in an `
   isset` or `!emmpty` or something in bps-search.php on line 42.

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

 *  Plugin Author [Andrea Tarantini](https://wordpress.org/support/users/dontdream/)
 * (@dontdream)
 * [2 years ago](https://wordpress.org/support/topic/undefined-array-key-http_referer-in/#post-17550949)
 * Hi hemligg,
 * Thank you for your report!
 * Does your server use a different key instead of HTTP_REFERER? Without the value
   of `$_SERVER['HTTP_REFERER']` BP Profile Search doesn’t work during AJAX requests,
   because the code can’t tell which page the AJAX request is coming from.
 *  Thread Starter [hemligg](https://wordpress.org/support/users/hemligg/)
 * (@hemligg)
 * [2 years ago](https://wordpress.org/support/topic/undefined-array-key-http_referer-in/#post-17551015)
 * Well I don’t know why it doesn’t work. I just noticed that the error_log is full
   of the same warning about this line of code.
 * We are running a Buddyboss installation on a Litespeed server on an ubuntu instance
   at AWS. I don’t know if our server use a different key than HTTP_REFERER.
 * I haven’t noticed that the searches doesn’t work besides maybe occasionally that
   the filter isn’t applied although it should but when that has happened I just
   reload and it works again.
 *  Plugin Author [Andrea Tarantini](https://wordpress.org/support/users/dontdream/)
 * (@dontdream)
 * [2 years ago](https://wordpress.org/support/topic/undefined-array-key-http_referer-in/#post-17551037)
 * Could you please check if the filters are only applied on the first page of results
   and never on the second and subsequent pages?
 *  Thread Starter [hemligg](https://wordpress.org/support/users/hemligg/)
 * (@hemligg)
 * [2 years ago](https://wordpress.org/support/topic/undefined-array-key-http_referer-in/#post-17551052)
 * The filter is applied on all pages. We are using the GET method.
 *  Plugin Author [Andrea Tarantini](https://wordpress.org/support/users/dontdream/)
 * (@dontdream)
 * [2 years ago](https://wordpress.org/support/topic/undefined-array-key-http_referer-in/#post-17551075)
 * So I assume it’s safe to just suppress the warning. I will release the change
   in a few days, possibly this weekend.
 *  Plugin Author [Andrea Tarantini](https://wordpress.org/support/users/dontdream/)
 * (@dontdream)
 * [1 year, 12 months ago](https://wordpress.org/support/topic/undefined-array-key-http_referer-in/#post-17556183)
 * Hi hemligg,
 * I just released a hotfix, to get it you should delete your copy of BP Profile
   Search and reinstall it.
 * Please let me know if this removes the PHP warnings in your log.

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

The topic ‘undefined array key “HTTP_REFERER” in…’ is closed to new replies.

 * ![](https://ps.w.org/bp-profile-search/assets/icon.svg?rev=1568973)
 * [BP Profile Search](https://wordpress.org/plugins/bp-profile-search/)
 * [Support Threads](https://wordpress.org/support/plugin/bp-profile-search/)
 * [Active Topics](https://wordpress.org/support/plugin/bp-profile-search/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/bp-profile-search/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/bp-profile-search/reviews/)

 * 6 replies
 * 2 participants
 * Last reply from: [Andrea Tarantini](https://wordpress.org/support/users/dontdream/)
 * Last activity: [1 year, 12 months ago](https://wordpress.org/support/topic/undefined-array-key-http_referer-in/#post-17556183)
 * Status: not resolved