Hi there,

I got this error message warning: Division by zero in /home/inge/public_html/beta/sites/all/modules/webform-fivestar/fivestar.inc on line 211.

I chose stars as display.

CommentFileSizeAuthor
error-webform-fivestar.png502.95 KBdanielhonrade

Comments

carinadigital’s picture

Assigned: Unassigned » carinadigital
Status: Active » Needs work

Just for clarification, the stars display option is used on table view and individual submission view. It won't appear on the analysis page.

Food Main course2 shows the issue. If we have one submission, and that submission is a zero rated submission, then we get a division by zero error.

$average_rating = $submission_count ? round($rating_total/($submission_count- $ranges[0]), 1) : 0;
danielhonrade’s picture

Yeah, got that, but please make a conditional statement not to do that, division by zero,
and how do you set this up not to appear on the analysis? seems automatic, BTW, great job!

carinadigital’s picture

Just committed fix into the dev version and publishing the dev snapshots for the 6.x version.
The analysis screen is non-optional at the moment. I can see how it's become overloaded.

I'll spin it off into a feature request. What would recommend as options? None, basic and full analysis?

carinadigital’s picture

Status: Needs work » Needs review
danielhonrade’s picture

Hi, nice... well, put as many options that will do for everyone, thanks!

danielhonrade’s picture

Status: Needs review » Closed (fixed)
carinadigital’s picture

Status: Closed (fixed) » Reviewed & tested by the community

Putting this back to 'reviewed and tested' . Once the fix has been reviewed I need it to remain open to test the fix it in the next beta. The bug is still present in the current version 6.x-1.0-beta1 so I want anyone looking at the bugs list to see this.

carinadigital’s picture

Status: Reviewed & tested by the community » Closed (fixed)
carinadigital’s picture

Status: Closed (fixed) » Fixed

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.