Uploaded image for project: 'CiviCRM'
  1. CiviCRM
  2. CRM-4217

The watchdog function in drupal 6 already includes the translation of a message.

    Details

    • Type: Bug
    • Status: Done/Fixed
    • Priority: Trivial
    • Resolution: Fixed/Completed
    • Affects Version/s: 2.1, 2.2.0
    • Fix Version/s: 2.2.0
    • Labels:
      None

      Description

      The watchdog function in drupal 6 already includes the translation of a message. Therefore it should not be called like its done for example in civicrm_group_roles.module:

      $msg = t('Error: Unable to sync role @role', array('@role' => $role) );
      watchdog('civicrm_group_roles', $msg);
      if ($debug_mode) drupal_set_message($msg);

      instead it should be more like:

      $msg = 'Error: Unable to sync role @role';
      $variables = array('@role' => $role);

      watchdog('civicrm_group_roles', $msg, $variables);
      if ($debug_mode) drupal_set_message(t($msg, $variables));

      See api documentation: http://api.drupal.org/api/function/watchdog/6

        Attachments

          Activity

            People

            • Assignee:
              shot Piotr Szotkowski
              Reporter:
              ositoblanco Osito Blanco
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: