Support » Plugin: Downloads Manager » [Plugin: Downloads Manager] Unsupported operand on line 69 of functions.php

  • Hello,

    PHP Fatal error: Unsupported operand types….

    there is a bug in functions.php on line 69 if the $file variable has no contents for whatever reason. The fix is to wrap an if around the size calculation if strlen($file) > 1.

    This way if the $file has length then the size manipulation takes place else a 0 size could be set. This bug prevents the downloads from appearing within the download manager. Such as the following code.

    if (strlen($file) > 1) {
      $i = 0;^M
      $type = array("B", "KB", "MB", "GB");^M
      while (($size/1024)>1) {^M
        $size=$size/1024;^M
        $i++;^M
      }^M
      } else {
            $size="0.00";
      }

    Best regards,
    Edward

  • The topic ‘[Plugin: Downloads Manager] Unsupported operand on line 69 of functions.php’ is closed to new replies.