PHP warning: Undefined array key “HTTP_USER_AGENT”
-
Warning:
PHP Warning: Undefined array key “HTTP_USER_AGENT” in /wp-content/plugins/product-video-gallery-slider-for-woocommerce/public/class-rendering.php on line 29Environment:
– WordPress / WooCommerce site
– PHP 8.2
– WooCommerce active
– Not a headless siteIt looks like the plugin may be accessing $_SERVER[‘HTTP_USER_AGENT’] directly without checking whether it exists first. This can generate warnings during cron, WP-CLI, bot requests, or background/server-side requests where HTTP_USER_AGENT is not available.
Could you please confirm if there is an updated version or recommended patch for this issue? i am using Version 1.5.1.6
We do not want to edit the plugin core directly because changes may be overwritten during updates, so we would appreciate an official fix or guidance.
Thanks.
Jafar
You must be logged in to reply to this topic.