Title: Undefined array key &#8220;HTTP_ACCEPT_LANGUAGE&#8221;
Last modified: March 4, 2024

---

# Undefined array key “HTTP_ACCEPT_LANGUAGE”

 *  Resolved [Linn](https://wordpress.org/support/users/linnalexandra/)
 * (@linnalexandra)
 * [2 years, 3 months ago](https://wordpress.org/support/topic/undefined-array-key-http_accept_language/)
 * We’re receiving this warning on PHP 8.2:
 *     ```wp-block-code
       PHP Warning:  Undefined array key "HTTP_ACCEPT_LANGUAGE" in /wp-content/plugins/countdown-builder/classes/countdown/CircleCountdown.php on line 182
       ```
   
 * I copied the [change you made in SimpleCountdown.php to fix the same error](https://wordpress.org/support/topic/undefined-array-key-warning-3/),
   changing line 182 of CircleCountdown.php from this:
 *     ```wp-block-code
       $lang = substr($_SERVER['HTTP_ACCEPT_LANGUAGE'], 0, 2);
       ```
   
 * to this:
 *     ```wp-block-code
       $serverLang = '';
       if (!empty($_SERVER['HTTP_ACCEPT_LANGUAGE'])) {
           $serverLang = $_SERVER['HTTP_ACCEPT_LANGUAGE'];
       }
       $lang = substr($serverLang, 0, 2);
       ```
   
 * and that fixed it, but obviously we’d prefer a permanent fix in the plugin 🙂
   Thanks!

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

 *  Plugin Author [adamskaat](https://wordpress.org/support/users/adamskaat/)
 * (@adamskaat)
 * [2 years, 3 months ago](https://wordpress.org/support/topic/undefined-array-key-http_accept_language/#post-17476489)
 * Hi [@linnalexandra](https://wordpress.org/support/users/linnalexandra/),
   Thank
   you for your request and help.We fixed that and other issues on our latest version,
   please update and let me know about your progress.Also i would like to know do
   you have any new feature suggestions?
 *  Thread Starter [Linn](https://wordpress.org/support/users/linnalexandra/)
 * (@linnalexandra)
 * [2 years, 3 months ago](https://wordpress.org/support/topic/undefined-array-key-http_accept_language/#post-17477062)
 * The update fixed it, thanks so much for the speedy reply! I can’t think of any
   feature suggestions but I will let you know 🙂

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

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

 * ![](https://ps.w.org/countdown-builder/assets/icon-128x128.png?rev=1821564)
 * [Countdown, Coming Soon, Maintenance - Countdown & Clock](https://wordpress.org/plugins/countdown-builder/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/countdown-builder/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/countdown-builder/)
 * [Active Topics](https://wordpress.org/support/plugin/countdown-builder/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/countdown-builder/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/countdown-builder/reviews/)

 * 2 replies
 * 2 participants
 * Last reply from: [Linn](https://wordpress.org/support/users/linnalexandra/)
 * Last activity: [2 years, 3 months ago](https://wordpress.org/support/topic/undefined-array-key-http_accept_language/#post-17477062)
 * Status: resolved