Fixed List average value - Division by zero

varst

Member
When selecting the calculation of the average value in the list settings and when there are no records in the list, the error “Division by zero” is displayed. Has anyone encountered this? And how can it be solved?
 
I can't replicate.
Which Fabrik version?

Enable J! system debug to get the error stack.
 
Joomla 5.2.1, Fabrik 4.4.1

divisionZero.png

 
Ok, it's not 'split' but if 'grouped by'.

In components\com_fabrik\models\element.php
change line 5321 to
$uberObject->value = count($results2) == 0 ? 0 : $uberTotal / count($results2);
 
Back
Top