Page 1 of 1

Warning Error Division by Zero on agHelper.php

Posted: Thu Mar 14, 2013 9:23 pm
by DirkP
I am just starting to learn Joomla 2.5 Stable and was trying out the Admiror Gallery.
The import of the pictures was going okay, and I changed the default size of the thumbs within the settings.

When I now go to the Gallery Menu, I see above Album name the error warning as shown below.
Warning: Division by zero in C:\xampp\htdocs\MySite\plugins\content\admirorgallery\admirorgallery\classes\agHelper.php on line 360

It is only showing this the first time I am entering the Gallery Meu from the Home of the Main Menu
As soon as I have clicked on the Albums and opened them and go back to the Gallery choose, the warning is gone.

I did open the agHelper.php and look at line 360. There it is calculating the height and width of the thumbs I beleave.
Looks like the first time one of the variables is zero. Is there a fix or can we have a look to set it on 1 then. ?

Does anyone have had this before ?

Kind regards
Dirk

Re: Warning Error Division by Zero on agHelper.php

Posted: Tue Mar 19, 2013 12:08 pm
by Vasiljevski
There is a problem with you menu link.

Delete it and create a new menu link with the same settings.

Or check the link points to the correct item : index.php?option=com_admirorgallery&view=layout&Itemid=495

If your link is : index.php?option=com_admirorgallery&view=layout you will get the dividing error, because the layout cannot get the parameters because it it missing Itemid param.