Hi, I just found weird usage of the format_plural() and drupal_set_message() in this module code.

drupal_set_message(
      format_plural(
        count($not_received),
        t(
          'There was a problem processing your application for: %roles',
          array('%roles' => implode(', ', $not_received)), 'error'
        ),
        t(
          'There was a problem processing your applications for: %roles',
          array('%roles' => implode(', ', $not_received)), 'error'
        )
      )
    );

There is no 'error' parameter for t(), format_plural() already using t() for it's strings…

Comments

denes.szabo’s picture

StatusFileSize
new1.48 KB

I attached my patch for 7.x-1.x.

Soren Jones’s picture

Awesome! Thanks!

denes.szabo’s picture

StatusFileSize
new1.47 KB

My patch for 6.x-1.x has attached.

Soren Jones’s picture

Title: Weird code » Improper use of format_plural()
Version: 7.x-1.x-dev » 6.x-1.x-dev
Priority: Major » Normal

Committed to 7.

Soren Jones’s picture

Status: Needs review » Fixed

Committed to 6. Thanks, again!

Status: Fixed » Closed (fixed)

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