Page 1 of 1

Bug Found

Posted: 14 Apr 2016, 16:12
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

Re: Bug Found

Posted: 16 Apr 2016, 15:06
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) );
		}

Re: Bug Found

Posted: 16 May 2016, 15:00
by Jan
Hi, fixed in version 4.3.0

Jan