Title: PHP Warning: Undefined array key &#8220;HTTP_USER_AGENT&#8221;
Last modified: June 22, 2022

---

# PHP Warning: Undefined array key “HTTP_USER_AGENT”

 *  Resolved [dimal](https://wordpress.org/support/users/dimalifragis/)
 * (@dimalifragis)
 * [3 years, 11 months ago](https://wordpress.org/support/topic/php-warning-undefined-array-key-http_user_agent-2/)
 * 22-Jun-2022 04:47:06 UTC] PHP Warning: Undefined array key “HTTP_USER_AGENT” 
   in /home/wp-content/plugins/ultimate-post/classes/Functions.php on line 562
 * WP 6 and PHP 8.0.x
 * And why http_user_agent is used in the plugin? I do not get it. Is that data 
   collection?
 * Thank you

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

 *  Plugin Author [WPXPO](https://wordpress.org/support/users/wpxpo/)
 * (@wpxpo)
 * [3 years, 11 months ago](https://wordpress.org/support/topic/php-warning-undefined-array-key-http_user_agent-2/#post-15763007)
 * Hello [@dimalifragis](https://wordpress.org/support/users/dimalifragis/) ,
    This
   is our plugin bug. Our development team already fixed this bug. We will release
   a new update as soon as possible.
 * Question: And why http_user_agent is used in the plugin? I do not get it. Is 
   that data collection?
 * Ans: No, this code is not for collecting data. We have an option in Query called“
   Post Per Page”. Here you can set a specific number of posts for Desktop, Tablet,
   and Mobile separately. For specifying the mobile, tablet, and Desktop we use 
   HTTP_USER_AGENT data to understand the user’s device. Hope you got the point.
 * Thank you so much.
 *  [Tonmoy](https://wordpress.org/support/users/azimkhan123/)
 * (@azimkhan123)
 * [3 years, 11 months ago](https://wordpress.org/support/topic/php-warning-undefined-array-key-http_user_agent-2/#post-15771509)
 * Hello [@dimalifragis](https://wordpress.org/support/users/dimalifragis/) ,
    Your
   issue has been fixed in the latest update. Please update your plugin and send
   us feedback if you still face this type of warning.
 * Have a nice day!

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

The topic ‘PHP Warning: Undefined array key “HTTP_USER_AGENT”’ is closed to new 
replies.

 * ![](https://ps.w.org/ultimate-post/assets/icon-256x256.gif?rev=2540610)
 * [Post Grid Gutenberg Blocks for News, Magazines, Blog Websites - PostX](https://wordpress.org/plugins/ultimate-post/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/ultimate-post/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/ultimate-post/)
 * [Active Topics](https://wordpress.org/support/plugin/ultimate-post/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/ultimate-post/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/ultimate-post/reviews/)

 * 2 replies
 * 3 participants
 * Last reply from: [Tonmoy](https://wordpress.org/support/users/azimkhan123/)
 * Last activity: [3 years, 11 months ago](https://wordpress.org/support/topic/php-warning-undefined-array-key-http_user_agent-2/#post-15771509)
 * Status: resolved