WordPress.org

Support

Support » Plugins and Hacks » [Resolved] Division by zero

[Resolved] Division by zero

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author ramon fincken

    @ramon-fincken

    Thanks Dustin, has the plugin spidered/crawled some pages or none yet?

    @ramon
    Yes, it occurs when a crawl has already been performed.

    The error occurs when calculating the load time per page. If amount of pages crawled in a run is 0, you will get this error.

    It’s possible to fix by changing line 132 of warm-cache.php to the following:

    $table_string .= (intval($temp['pages_count'])!=0) ? $temp['time']/$temp['pages_count'].'</td><td valign="top">' : '- </td><td valign="top">';

    This adds a check and doesn’t run the code if the amount of pages crawled is 0.

    Plugin Author ramon fincken

    @ramon-fincken

    Excellent piece of code and solution, I will implement this right away.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘[Resolved] Division by zero’ is closed to new replies.