Osclass Support Forums

Osclass theme support => Gamma Osclass Theme => Topic started by: Vlad7 on December 04, 2021, 07:44:52 PM

Title: Errors on osclass 8 and php8
Post by: Vlad7 on December 04, 2021, 07:44:52 PM
Hello, I got errors after updating osclass to version 8

[04-Dec-2021 17:42:51 Europe/Kiev] PHP Warning:  Undefined array key "HTTP_USER_AGENT" in /home2/ukagroco/public_html/oc-content/themes/gamma/functions.php on line 135
[04-Dec-2021 17:42:51 Europe/Kiev] PHP Warning:  Undefined array key "HTTP_USER_AGENT" in /home2/ukagroco/public_html/oc-content/themes/gamma/functions.php on line 136
[04-Dec-2021 17:42:51 Europe/Kiev] PHP Warning:  Undefined array key "HTTP_USER_AGENT" in /home2/ukagroco/public_html/oc-content/themes/gamma/functions.php on line 137
[04-Dec-2021 17:42:51 Europe/Kiev] PHP Warning:  Undefined array key "HTTP_USER_AGENT" in /home2/ukagroco/public_html/oc-content/themes/gamma/functions.php on line 138
[04-Dec-2021 17:42:51 Europe/Kiev] PHP Warning:  Undefined array key "HTTP_USER_AGENT" in /home2/ukagroco/public_html/oc-content/themes/gamma/functions.php on line 139
Title: Re: Errors on osclass 8 and php8
Post by: MB Themes on December 04, 2021, 07:47:05 PM
@Vlad7
Thank you, this is fix:
Code: [Select]
  $iPod    = stripos(@$_SERVER['HTTP_USER_AGENT'],"iPod");
  $iPhone  = stripos(@$_SERVER['HTTP_USER_AGENT'],"iPhone");
  $iPad    = stripos(@$_SERVER['HTTP_USER_AGENT'],"iPad");
  $Android = stripos(@$_SERVER['HTTP_USER_AGENT'],"Android");
  $webOS   = stripos(@$_SERVER['HTTP_USER_AGENT'],"webOS");
Title: Re: Errors on osclass 8 and php8
Post by: Vlad7 on December 04, 2021, 09:24:23 PM
@Vlad7
Thank you, this is fix:
Code: [Select]
  $iPod    = stripos(@$_SERVER['HTTP_USER_AGENT'],"iPod");
  $iPhone  = stripos(@$_SERVER['HTTP_USER_AGENT'],"iPhone");
  $iPad    = stripos(@$_SERVER['HTTP_USER_AGENT'],"iPad");
  $Android = stripos(@$_SERVER['HTTP_USER_AGENT'],"Android");
  $webOS   = stripos(@$_SERVER['HTTP_USER_AGENT'],"webOS");


thanks  :D