I've been seeing pairs of messages like this for weeks in my watchdog logs

"Invalid argument supplied for foreach() in /var/www/folkjam/html/includes/common.inc on line 752."
"strtr() [function.strtr]: The second argument is not an array in /var/www/folkjam/html/includes/common.inc on line 767."

I added some code to t() in common.inc to tell me a little more, and tracked the problem down to this call to drupal_set_message() within GeoNames

    if (empty($data)) {  
      drupal_set_message(t('Fetching data from GeoNames failed... please try again later.', 'error'));
      return FALSE;
    }

The 'error' argument is intended for drupal_set_message(), but is accidentally getting passed as the second parameter to t(), which is supposed to be an array of replacements.

Comments

lyricnz’s picture

Status: Active » Fixed

Fixed in D5, D6 and HEAD CVS.

Status: Fixed » Closed (fixed)

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