Title: Check for HTTP_USER_AGENT?
Last modified: June 25, 2024

---

# Check for HTTP_USER_AGENT?

 *  Resolved [Mike Witt](https://wordpress.org/support/users/mike80222/)
 * (@mike80222)
 * [1 year, 11 months ago](https://wordpress.org/support/topic/check-for-http_user_agent/)
 * Hi,
 * I feel like there should be a check in wp-quicklatex.php, around line 1719, for
   HTTP_USER_AGENT. Maybe something like:
 * `// Do not count bots since they are not users and we are looking for user experience.
   
   if ( isset($_SERVER['HTTP_USER_AGENT']) ) { $agent = strtolower($_SERVER['HTTP_USER_AGENT']);}
   else { $agent = 'Unknown'; }
 * This would avoid PHP complaints like:
 * `PHP Notice: Undefined index: HTTP_USER_AGENT in /opt/bitnami/apps/wordpress/
   htdocs/wp-content/plugins/wp-quicklatex/wp-quicklatex.php on line 1719`
 * Does that make any sense?

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

 *  Plugin Author [advanpix](https://wordpress.org/support/users/advanpix/)
 * (@advanpix)
 * [1 year, 11 months ago](https://wordpress.org/support/topic/check-for-http_user_agent/#post-17850528)
 * Yes, absolutely. I have included your fix into the newest version (released a
   few minutes ago). Please test it now.
 *  Thread Starter [Mike Witt](https://wordpress.org/support/users/mike80222/)
 * (@mike80222)
 * [1 year, 11 months ago](https://wordpress.org/support/topic/check-for-http_user_agent/#post-17852703)
 * Hi [@advanpix](https://wordpress.org/support/users/advanpix/),
 * Sorry about the delay. As far as “testing” it, the warning is only going to happen
   once in a while. But the change in 3.8.8 looks equivalent to the patch I’ve been
   using for a long time. So AFAICT that’s good.
 * It’s nice to see wp-quicklatex getting updated. (Not that I’d want to see a lot
   of updates!) But nice to know that it’s still alive.
 * Cheers,
 * Mike

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

The topic ‘Check for HTTP_USER_AGENT?’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/wp-quicklatex.svg)
 * [WP QuickLaTeX](https://wordpress.org/plugins/wp-quicklatex/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-quicklatex/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-quicklatex/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-quicklatex/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-quicklatex/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-quicklatex/reviews/)

 * 2 replies
 * 2 participants
 * Last reply from: [Mike Witt](https://wordpress.org/support/users/mike80222/)
 * Last activity: [1 year, 11 months ago](https://wordpress.org/support/topic/check-for-http_user_agent/#post-17852703)
 * Status: resolved