Undefined index: HTTP_USER_AGENT in [..] agGallery.php

Admiror Gallery is free extension for Joomla! based websites. Admiror Gallery is all in one, a simple and instant solution for rendering image gallery from folder with images, but very flexible and adaptable.
Post Reply
Message
Author
tkuschel
Posts: 2
Joined: Fri Jan 09, 2015 4:45 pm

Undefined index: HTTP_USER_AGENT in [..] agGallery.php

#1 Post by tkuschel »

I got notices in error file if the user agent HTTP_USER_AGENT is not set.

Code: Select all

[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: Select all

		//$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

Admiror Gallery 5 - Fundraising Campaign

User avatar
Vasiljevski
Developer
Developer
Posts: 1258
Joined: Sat Aug 14, 2010 9:31 pm
Location: Novi Sad, Serbia
Contact:

Re: Undefined index: HTTP_USER_AGENT in [..] agGallery.php

#2 Post by Vasiljevski »

Thank you for reporting this issue.
It will be included in the next release. :)
Added on https://github.com/vasiljevski/admirorgallery in revision 3
Help Admiror Gallery become even better,
give us a review on JED

Post Reply