• Resolved peoy

    (@peoy)


    Caused by this (when $rating_count is zero, or when ratings are disabled)

    // GLOBAL RATING
    $post_count = $testimonials->post_count;
    $global_rating_number = round($global_rating / $rating_count, 1);

    I added error_reporting(E_NONE) to the beginning of testimonial-rotator.php, but it is easy enough to repair the correct way.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter peoy

    (@peoy)

    // GLOBAL RATING
    $post_count = $testimonials->post_count;
    $global_rating_number = $rating_count != 0 ? round($global_rating / $rating_count, 1) : 0;

    Plugin Author Hal Gatewood

    (@halgatewood)

    Thanks! I just pushed version 2.5.1 with your fix!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Division by zero in testimonial-rotator.php on line 547’ is closed to new replies.