Title: Undefined array key &#8220;HTTP_REFERER&#8221;
Last modified: April 22, 2025

---

# Undefined array key “HTTP_REFERER”

 *  [swinggraphics](https://wordpress.org/support/users/swinggraphics/)
 * (@swinggraphics)
 * [1 year, 1 month ago](https://wordpress.org/support/topic/undefined-array-key-http_referer-2/)
 * In error logs: Undefined array key “HTTP_REFERER” in /public_html/wp-content/
   plugins/modern-events-calendar-lite/app/libraries/main.php on line 6950

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

 *  [fotokoeberl](https://wordpress.org/support/users/fotokoeberl/)
 * (@fotokoeberl)
 * [1 year, 1 month ago](https://wordpress.org/support/topic/undefined-array-key-http_referer-2/#post-18435536)
 * Can confirm, same here.
 *  [angel1975](https://wordpress.org/support/users/angel1975/)
 * (@angel1975)
 * [1 year ago](https://wordpress.org/support/topic/undefined-array-key-http_referer-2/#post-18449347)
 * The same for me. For every shortcode I tried. But on mobile it’s perfect. Only
   problem on PC.
 *  [angel1975](https://wordpress.org/support/users/angel1975/)
 * (@angel1975)
 * [1 year ago](https://wordpress.org/support/topic/undefined-array-key-http_referer-2/#post-18449843)
 * Guys…
 * Waiting for the fix of mistake from the developers I solved in this way:
 * I downloaded the file main.php from the path:
    /wp-content/plugins/modern-events-
   calendar-lite/app/libraries/main.php
 * at line 6950 I had: 
   if(str_contains($_SERVER[‘HTTP_REFERER’],’external=1′)){
 * I changed into: 
   if(isset($_SERVER[‘HTTP_REFERER’]) && str_contains($_SERVER[‘
   HTTP_REFERER’], ‘external=1’)){
 * `isset($_SERVER['HTTP_REFERER'])` checks if the key exists before passing it 
   to `str_contains()`, avoiding the warning.
 * Bye!
   A.

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

The topic ‘Undefined array key “HTTP_REFERER”’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/modern-events-calendar-lite_e2f4ff.
   svg)
 * [Modern Events Calendar Lite](https://wordpress.org/plugins/modern-events-calendar-lite/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/modern-events-calendar-lite/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/modern-events-calendar-lite/)
 * [Active Topics](https://wordpress.org/support/plugin/modern-events-calendar-lite/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/modern-events-calendar-lite/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/modern-events-calendar-lite/reviews/)

 * 3 replies
 * 3 participants
 * Last reply from: [angel1975](https://wordpress.org/support/users/angel1975/)
 * Last activity: [1 year ago](https://wordpress.org/support/topic/undefined-array-key-http_referer-2/#post-18449843)
 * Status: not resolved