Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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.
Comment | File | Size | Author |
---|---|---|---|
#8 | themoreyouknow.jpg | 18.15 KB | joelpittet |
#2 | 2468889-2-mailchimp_campaign_watchdog.patch | 3.97 KB | eojthebrave |
mailchimp_campaign_fix_watchdog_params.patch | 3.97 KB | nvahalik | |
Comments
Comment #1
nvahalik CreditAttribution: nvahalik commentedComment #2
eojthebraveYes! 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.
Comment #4
joelpittetWas committed marking as fixed.
Comment #5
jami CreditAttribution: jami at ThinkShout for Mailchimp commentedThanks for the fix, nvahalik, and the review and update, eojthebrave and joelpettit!
Comment #6
joelpittet"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;)
Comment #7
jami CreditAttribution: jami commentedAhhh. Was wondering why one versus the other. Thanks!
Comment #8
joelpittetYeah it's strange:) But useful once you know.