0
Welcome Guest! Login
0 items Join Now

SOLVED Undefined index: HTTP_USER_AGENT

  • SOLVED Undefined index: HTTP_USER_AGENT

    Posted 9 years 8 months ago
    • several of our development sites are reporting the following issue "Undefined index: HTTP_USER_AGENT" in the server logs; these notices are reported from gantry and mod_roknavmen (see secure for exact errors)
    • prim's Avatar
    • prim
    • Preeminent Rocketeer
    • Posts: 17290
    • Thanks: 217

    Re: SOLVED Undefined index: HTTP_USER_AGENT

    Posted 9 years 8 months ago
  • Re: SOLVED Undefined index: HTTP_USER_AGENT

    Posted 9 years 8 months ago
    • yes, the (Zombified) Tread you mentioned did fix the issue with some modifications. It would be nice to see these changes make it into the Gantry 4.1.25 core.

      I had to make the following changes
      change line 91 in \libraries\gantry\core\gantrybrowser.class.php
      from
      $this->user_agent = $_SERVER['HTTP_USER_AGENT'];
      to
      $this->user_agent = isset($_SERVER['HTTP_USER_AGENT']) ? $_SERVER['HTTP_USER_AGENT'] : "undefined";

      and
      change line 22 in \modules\mod_roknavmenu\lib\common\RokBrowserCheck.php
      from
      $this->_ua = $_SERVER['HTTP_USER_AGENT'];
      to
      $this->_ua = isset($_SERVER['HTTP_USER_AGENT']) ? $_SERVER['HTTP_USER_AGENT'] : "undefined";
    • The following users have thanked you: Trevor Smith, webjo

    • MrT's Avatar
    • MrT
    • Preeminent Rocketeer
    • Posts: 101084
    • Thanks: 13481
    • Web Designer/Developer

    Re: SOLVED Undefined index: HTTP_USER_AGENT

    Posted 9 years 8 months ago
    • I've now raised a bug ticket for this...

      Regards, Mark.
    • The following users have thanked you: jtechmedical

    • Please search forums before posting. Please make sure your post includes the version of the CMS you are using and a link to the problem. Annotations on screenshots can also be helpful to explain problems/goals. Please use the "secure" tab for confidential information.
    • MrT's Avatar
    • MrT
    • Preeminent Rocketeer
    • Posts: 101084
    • Thanks: 13481
    • Web Designer/Developer

    Re: SOLVED Undefined index: HTTP_USER_AGENT

    Posted 9 years 8 months ago
    • This message contains only secure information that is visible to MrT, moderators and administrators
    • Please search forums before posting. Please make sure your post includes the version of the CMS you are using and a link to the problem. Annotations on screenshots can also be helpful to explain problems/goals. Please use the "secure" tab for confidential information.

Time to create page: 0.052 seconds