Problem
After update to the latest dev, I can't open admin/reports/dblog page - it just shows blank Drupal page with error message. Full text of the message is as follows: "Recoverable fatal error: Argument 2 passed to t() must be an array, string given, called in /home/staratel/sites/issueranger/modules/dblog/dblog.admin.inc on line 265 and defined in t() (line 1476 of /home/staratel/sites/issueranger/includes/bootstrap.inc)."

Why it is Metatag issue
After debugging, I've understood that error caused by wrong messages put in the dblog. The reason is in these lines (see http://api.drupal.org/api/drupal/includes!bootstrap.inc/function/watchdog/7 for more details):

    // A per-iterationl message, only record if not running via Drush.
    if (php_sapi_name() != 'cli') {
      watchdog('metatag', t('Update 7004: !count records were updated.', array('!count' => $x)), 'info');
    }

Solution
They should be:

    // A per-iterationl message, only record if not running via Drush.
    if (php_sapi_name() != 'cli') {
      watchdog('metatag', 'Update 7004: !count records were updated.', array('!count' => $x), 'info');
    }

I will provide a patch soon which will include an update for this also.

Also see related issue: #1279680: watchdog() does not type its array arguments

Comments

PatchRanger’s picture

Issue summary: View changes

Typos fixed

PatchRanger’s picture

Issue summary: View changes

Some formatting.

PatchRanger’s picture

Issue summary: View changes

Improvement of the code.

PatchRanger’s picture

Status: Active » Needs review
StatusFileSize
new1.9 KB
damienmckenna’s picture

Status: Needs review » Fixed

Thank you for catching that. Committed!

damienmckenna’s picture

Status: Fixed » Needs review
StatusFileSize
new1.59 KB

I also got mixed up between drupal_set_message() statuses and watchdog() statuses.

damienmckenna’s picture

Status: Needs review » Fixed

Committed.

PatchRanger’s picture

I also got mixed up between drupal_set_message() statuses and watchdog() statuses.

Op, sorry, it's my fault too.

damienmckenna’s picture

@Staratel: You're not the one who committed the original faulty code, don't worry about it :-) Thanks for all your help!

Status: Fixed » Closed (fixed)

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

Anonymous’s picture

Issue summary: View changes

Added link to Drupal core related issue.