Admiror Joomla! Community
http://www.vasiljevski.com/forum/

Undefined index: HTTP_USER_AGENT in [..] agGallery.php
http://www.vasiljevski.com/forum/viewtopic.php?f=30&t=1424
Page 1 of 1

Author:  tkuschel [ Tue Jan 27, 2015 11:31 am ]
Post subject:  Undefined index: HTTP_USER_AGENT in [..] agGallery.php

I got notices in error file if the user agent HTTP_USER_AGENT is not set.
Code:
[Tue Jan 27 06:40:19 2015] [error] [client 217.40.204.145] PHP Notice:  Undefined index: HTTP_USER_AGENT in /var/www/cms/plugins/content/admirorgallery/admirorgallery/classes/agGallery.php on line 598

File: plugins/content/admirorgallery/admirorgallery/classes/agGallery.php

I changed the following line 598:
Code:
      //$osVersion = $this->ag_get_os_($_SERVER['HTTP_USER_AGENT']);
      $osVersion = isset($_SERVER['HTTP_USER_AGENT']) ? $this->ag_get_os_($_SERVER['HTTP_USER_AGENT']) : 'Unknown - no user agent';


Thomas

Author:  Vasiljevski [ Thu Mar 19, 2015 3:05 pm ]
Post subject:  Re: Undefined index: HTTP_USER_AGENT in [..] agGallery.php

Thank you for reporting this issue.
It will be included in the next release. :)
Added on https://github.com/vasiljevski/admirorgallery in revision 3

Page 1 of 1 All times are UTC + 1 hour [ DST ]
Powered by phpBB® Forum Software © phpBB Group
https://www.phpbb.com/