In admin/reports/mandrill if the number of sent mails is 0 (zero), the page show the warning message:

"Warning: Division by zero in mandrill_reports_dashboard_page() (line 145 of /var/www/frasesdeangeles.com/sites/all/modules/mandrill/modules/mandrill_reports/mandrill_reports.module)."

The line 145 of the file is:

$percent = number_format($url['unique_clicks'] / $url['sent'], 2) * 100;

In this case $url['sent'] = 0.

Comments

jefflogan’s picture

I've prepared a patch for this issue. As it's my first patch, let me know if i've done anything wrong.

jefflogan’s picture

StatusFileSize
new644 bytes
gcb’s picture

Status: Active » Fixed

Patch looks great Jeff, thanks!

  • gcb committed bdf617a on 7.x-2.x authored by jeff.logan
    Issue #2298069 by jeff.logan: Division by 0 in admin/reports/mandrill
    

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.