*

Vlad7

  • ****
  • 244 posts
Errors on osclass 8 and php8
« 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

Marked as best answer by frosticek on December 05, 2021, 09:59:02 AM
*

MB Themes

Re: Errors on osclass 8 and php8
« Reply #1 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");
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

*

Vlad7

  • ****
  • 244 posts
Re: Errors on osclass 8 and php8
« Reply #2 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