404 Redirected
Division by zero error (2 posts)

  1. resistanceisfruitful
    Posted 2 years ago #

    My blog URL is returning this error ONLY when it does not include "www":

    Warning: Division by zero in /home/xxxxxxxx/public_html/blog/wp-content/plugins/404-redirected/includes/functions.php on line 208

    Does anyone know what is causing this line of code to error out?

    I've tried deactivating the plugin and renaming the .htaccess file.


  2. dkudler
    Posted 2 years ago #

    For what it's worth....

    I got this and found a solution. It's probably not the most elegant, but...

    I added a test at each line where the offending piece of code occurred (lines 208, 223, and 239); if $scoreBasis (the offending divisor) is equal to zero, the code sets $score to zero. Otherwise it runs the calculation as written:

    if ($scoreBasis != 0) {$score = 100 - (($levscore / $scoreBasis)*100);} else $score=0;

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • 404 Redirected
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic