Jhtml::image bug ?

Phoca Gallery - image gallery extension
josephvalet
Phoca Newbie
Phoca Newbie
Posts: 1
Joined: 13 Apr 2012, 22:47

Jhtml::image bug ?

Post by josephvalet »

Hi ,
thank you for your great work.

Maybe I'm wrong but I think I found a bug in :
com_phocagallery/views/category/tmpl/default_comments.php (line 16) in Phoca Gallery 3.2.0/J2.5.4 (so a php error appears in the comments on category view).

This line dont give the "alt" for the smileys icons and Joomla needs it:

Code: Select all

$comment = str_replace($smileyKey, JHtml::_( 'image', 'components/com_phocagallery/assets/images/'.$smileyValue .'.'.$this->tmpl['formaticon']), $comment);
I added some '' to it :

Code: Select all

$comment = str_replace($smileyKey, JHtml::_( 'image', 'components/com_phocagallery/assets/images/'.$smileyValue .'.'.$this->tmpl['formaticon'],''), $comment);
and the following error i had has disapered :
Warning: Missing argument 2 for JHtml::image() in D:\Infonet36\www\mdln\www\libraries\joomla\html\html.php on line 474
The Joomla function is :

Code: Select all

function image($file, $alt, $attribs = null, $relative = false, $path_only = false){}
Thank you to correct me if I'm wrong with this.

Joseph Valet
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 49150
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Jhtml::image bug ?

Post by Jan »

Hi, yes, you right, the alt needs to be added as there is no default value, I will fix it in next version.

Thank you for the info.

Jan
If you find Phoca extensions useful, please support the project
bender
Phoca Member
Phoca Member
Posts: 13
Joined: 09 Jun 2012, 14:50

Re: Jhtml::image bug ?

Post by bender »

thanks, josephvalet
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 49150
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Jhtml::image bug ?

Post by Jan »

Will be set in 3.2.1

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