WP-Popular Posts Tool
Division by 0. (1 post)

  1. alpha1beta
    Posted 2 years ago #

    I've been getting many PHP division by 0 errors on line 58. Whether you see the error or not will depend on your PHP configuration, if warnings are set to show or log or be ignored. Your PHP version may also count to whether or not you see these errors.

    Anyway, i took a look, and wrote a quick patch (Maybe you can do better) but it seems to stop those errors.

    Replace line 58 in wp-popular-posts-tool.php with the following lines.
    if( ($maxPostComments * $areaSize /2) == 0){
    $width = 0;
    } else {
    $width = $post->comment_count / $maxPostComments * $areaSize / 2;


Topic Closed

This topic has been closed to new replies.

About this Plugin

  • WP-Popular Posts Tool
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic