Miller-Media / send-emails-with-mandrill

A fork of the official wpMandrill plugin for Wordpress, since it is no longer being actively supported.
21 stars 15 forks source link

PHP Error/Notice Undefined variable $format #67

Closed RT-PDX closed 4 years ago

RT-PDX commented 4 years ago

When running the Mandrill report (Wordpress, under dashboard option). Throws many errors per report:

AH01071: Got error ': Undefined variable: format in /public_html/wp-content/plugins/send-emails-with-mandrill/lib/wpMandrill.class.php on line 1916

MillerMedia commented 4 years ago

Thanks for sending this through @RT-PDX ...

It looks like the switch loop could go within the if(is_array($params)) statement as the $format variable only gets defined if $params is an array. Should be a pretty easy fix for you or someone who may have a minute to work on it (otherwise we'll get to it soon).

One thing I can't remember is what that function does, so may want to just ensure that that logic won't break anything else. I can't imagine it would though.

crstauf commented 4 years ago

I can't remember what that function does

It's only called (internally) when processing statistics data (/stats.php).

MillerMedia commented 4 years ago

Committed this update to the new 1.2.10 branch: https://github.com/Miller-Media/send-emails-with-mandrill/tree/1.2.10

Will be released in next version