When viewing the database log trying to figure out why my API calls were failing, I started receiving this message:

Recoverable fatal error: Argument 2 passed to t() must be of the type array, integer given, called in /htdocs/modules/dblog/dblog.admin.inc on line 295 and defined in t() (line 1475 of /htdocs/includes/bootstrap.inc).

The problem is that there are numerous watchdog calls in mailchimp_campaign which pass WATCHDOG_ERROR as the third parameter instead of the fourth param.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

nvahalik’s picture

Status: Active » Needs review
eojthebrave’s picture

Version: 7.x-3.2 » 7.x-3.x-dev
Status: Needs review » Reviewed & tested by the community
FileSize
3.97 KB

Yes! This patch is awesome. It both fixes the problematic calls to the watchdog() function, and makes proper use of placeholders for dynamic content in messages so they are both translatable, and secure. Big +1 from me. It's also working on my local.

The attached patch is simply a re-roll of the patch above so that it will apply to 7.x-3.x without offsets.

  • jami committed 579bb80 on 7.x-3.x authored by eojthebrave
    Issue #2468889 by eojthebrave, nvahalik: Invalid watchdog arguments...
joelpittet’s picture

Status: Reviewed & tested by the community » Fixed

Was committed marking as fixed.

jami’s picture

Status: Fixed » Closed (fixed)

Thanks for the fix, nvahalik, and the review and update, eojthebrave and joelpettit!

joelpittet’s picture

Status: Closed (fixed) » Fixed

"Fixed" status will automatically close itself in 2 weeks. It's kinda nice in-case people are looking for recent fixes that may have broken their sites;)

jami’s picture

Ahhh. Was wondering why one versus the other. Thanks!

joelpittet’s picture

Issue summary: View changes
FileSize
18.15 KB

Yeah it's strange:) But useful once you know.

Status: Fixed » Closed (fixed)

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