Division by zero
-
At a file wp-content/plugins/rating-box/includes/site.php
there is an error in 60th line. There is an if:if( is_object($row) ){ $star_value = round(intval($row->total)/intval($row->count),0); }When the intval($row->count) equals zero then the “division by zero” error appears in posts where the ratingbox is included. I have changed the code like that:
if( is_object($row) && intval($row->count) != 0){ $star_value = round(intval($row->total)/intval($row->count),0); }and there is no problem now.
The topic ‘Division by zero’ is closed to new replies.