Support » Plugin: Multilingual Comments » Minor issue

  • Resolved awilmsmeier

    (@awilmsmeier)


    Hi,
    I have found a division by 0 warning message in the debug log:

    [10-Jan-2018 10:56:46 UTC] PHP Warning: Division by zero in /xxx/wp-content/plugins/multilingual-comments/public/class-multilingual-comments-public.php on line 203

    To fix that, replace line 203 with:

    if ( count($comments) !== 0) {
    $average_rating = $rating / count($comments);
    } else {
    $average_rating = 0;
    }

    Best regards,
    Andreas

  • The topic ‘Minor issue’ is closed to new replies.