Bug Found

Phoca Gallery - image gallery extension
sdabhi
Phoca Newbie
Phoca Newbie
Posts: 8
Joined: 17 Feb 2015, 09:32

Bug Found

Post by sdabhi »

i have installed phoca gallery latest version 4.2.2 and Joomla! 3.4.8 and PHP 5.4.40

In Options=>General Settings :

Display Tags : Yes (Category View)
Tags (Links) : Search Outcome

when i click on tag on front side i am getting bellow notice, how to fix it

Notice: Trying to get property of non-object in public_html/components/com_phocagallery/views/category/view.html.php on line 2068

Notice: Trying to get property of non-object in public_html/components/com_phocagallery/views/category/view.html.php on line 2068
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 49144
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Bug Found

Post by Jan »

Hi, thank you for the info, I will fix it in next version, for now you can make a quick fix:

FROM:

Code: Select all

		$user       = JFactory::getUser();
		$dispatcher = JDispatcher::getInstance();
		JPluginHelper::importPlugin('phocagallery');
		$results = $dispatcher->trigger( 'onViewCategory', array((int)$this->category->id, (int)$this->category->owner_id, (int)$user->id) );
		
TO:

Code: Select all

if (isset($this->category->id) && isset($this->category->owner_id)) {
		$user       = JFactory::getUser();
		$dispatcher = JDispatcher::getInstance();
		JPluginHelper::importPlugin('phocagallery');
		$results = $dispatcher->trigger( 'onViewCategory', array((int)$this->category->id, (int)$this->category->owner_id, (int)$user->id) );
		}
If you find Phoca extensions useful, please support the project
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 49144
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Bug Found

Post by Jan »

Hi, fixed in version 4.3.0

Jan
If you find Phoca extensions useful, please support the project
Post Reply