rating-box

Description

This plugin has been closed and is no longer available for download.

Reviews

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.

Read all 1 review

Contributors & Developers

“Rating Box” is open source software. The following people have contributed to this plugin.

Contributors

Translate “Rating Box” into your language.

Interested in development?

Browse the code, check out the SVN repository, or subscribe to the development log by RSS.