Undefined index: HTTP_USER_AGENT
-
I get the following NOTICE message:
PHP Notice: Undefined index: HTTP_USER_AGENT in ...public_html/wp-content/plugins/wp-fastest-cache/inc/cache.php on line 416Proposed solution:
public function isMobile(){ if(isset($_SERVER['HTTP_USER_AGENT']) && preg_match("/.*".$this->getMobileUserAgents().".*/i", $_SERVER['HTTP_USER_AGENT'])) return true; return false; }Please note that there are similar NOTICES around lines 130-140.
Similar solution works for me there, too.
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
The topic ‘Undefined index: HTTP_USER_AGENT’ is closed to new replies.