I was doing a new install for someone who had installed and enabled the MailChimp module without loading the MailChimp PHP library. When accessing the MailChimp module configuration, a bad Drupal log is created. Here is the event:

stdClass Object
(
    [wid] => 847
    [uid] => 1
    [severity] => 5
    [type] => mailchimp
    [timestamp] => 1383055105
    [message] => Failed to load MailChimp PHP library. Please refer to the installation requirements.
    [variables] => i:3;
    [link] => 
    [name] => admin
)

Line 295 has this:

$output = t($event->message, unserialize($event->variables));

1) Not sure why variables has "3" in it since the message has no variables defined.
2) According to the API docs for t(), the second parameter has to be an array.

I will be investigating. Because of this bad entry, none of the log will show.

CommentFileSizeAuthor
#2 mailchimp-2123077-WatchdogError.patch486 bytesdpearcefl
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

dpearcefl’s picture

Found it. Line 214 in mailchimp.module is:

    watchdog('mailchimp', $msg, WATCHDOG_ERROR);

when it should be:

    watchdog('mailchimp', $msg, NULL, WATCHDOG_ERROR);

Will check the latest dev version now.

dpearcefl’s picture

Patch attached. Now how do we deal with the bad watchdog log entries? Will look at an SQL query next.

dpearcefl’s picture

Status: Active » Needs review

Here is the SQL query needed to fix the old log entries:

UPDATE watchdog SET variables='a:0:{}' WHERE type='mailchimp' AND variables='i:3;';

I guess this needs to go in as an update?

tripper54’s picture