Examining recent log entries, I've noticed a couple of such pairs of messages:

# warning: Invalid argument supplied for foreach() in /var/www/html/beta.gewiss.si/includes/common.inc on line 789.
# warning: strtr() [function.strtr]: The second argument is not an array. in /var/www/html/beta.gewiss.si/includes/common.inc on line 806.

In all such cases a "Message" field was empty. As it is not possible to click on such entry (to go to display details), I've had to enter the right URL (the one between entries below and above the one) manually. Both such messages were displayed in detail view as well (confirming this entry is the troublemaker one).

Probably such entries with empty "Message" should be handled without an error, even if I suspect they are a sort of illegal (all such entries were caused by http://<my-test-website>/node/8/webform-results/clear (/node/8 is a contact webform).

It is beyond my knowledge weather webform module is responsible for such problematic log entry or it is Drupal logging system...

CommentFileSizeAuthor
#2 common.inc_.102108.patch338 bytesandrewjsledge
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

andrewjsledge’s picture

Maybe instead of

  if (empty($args)) {
    return $string;
  }

it should be

  if (empty($args) || !is_array($args)) {
    return $string;
  }

Simply, some sort of type insistence is required.

andrewjsledge’s picture

FileSize
338 bytes
dpearcefl’s picture

Is this still an issue using current Drupal 6?

Status: Active » Closed (outdated)

Automatically closed because Drupal 6 is no longer supported. If the issue verifiably applies to later versions, please reopen with details and update the version.