When i18n is installed there are several errors from the comment edited module. On line 220 of comment_edited.module the following line has an issue.

return i18nstrings("comment_edited:message_template", $template, $replacements);

This passes three arguments to the i18nstrings function with the third being $replacements.

function i18nstrings($name, $string, $langcode = NULL)

As you can see in the function definition if there is a third paramater it should be the langcode which it is not.

I believe what you meant to do was the following.

return i18nstrings("comment_edited:message_template", t($template, $replacements));

With the code as it is currently in dev I get three errors:

  • Illegal offset type in /com.bioware.drupal/sites/all/modules/drupal-contrib/i18n/i18nstrings/i18nstrings.module on line 848.
  • mysql_real_escape_string() expects parameter 1 to be string, array given in /com.bioware.drupal/includes/database.mysql.inc on line 380.
  • Illegal offset type in /com.bioware.drupal/sites/all/modules/drupal-contrib/i18n/i18nstrings/i18nstrings.module on line 856.

The above edit resolves this.

Comments

csavio’s picture

Actually looking at that again you probably wanted the following:

return i18nstrings("comment_edited:message_template", strtr($template, $replacements));
snufkin’s picture

Status: Active » Fixed

Thanks, fixed in dev. Once I resolve the bug #896816: Hidden edit gone when editing own comments i'll roll a new stable release.

Status: Fixed » Closed (fixed)

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