Wrong line displayed in watchdog() errors.

Island Usurper - February 27, 2009 - 20:19
Project:Coder
Version:6.x-2.x-dev
Component:Review/Rules
Category:bug report
Priority:normal
Assigned:Unassigned
Status:active
Description

The rule that says "The first two watchdog() parameters should be literal strings." shows the line before the watchdog() call.

#1

stella - March 6, 2009 - 20:19
Status:active» postponed (maintainer needs more info)

I don't think this is still an issue, at least not using the latest dev version. Can you confirm?

Cheers,
Stella

#2

Island Usurper - March 11, 2009 - 21:29
Status:postponed (maintainer needs more info)» active

Yes, the problem is still there as of the 2009-Mar-06 dev version.

If you want a live example, the uc_credit module in Ubercart has a bad watchdog() call on line 884. However, the "Interface text translatability" review flags line 883.

<?php
           $message
= t('Credit card encryption key file creation failed. Check your filepath settings and directory permissions.');
/* 883 */  drupal_set_message($message, 'error');
/* 884 */  watchdog('uc_credit', $message, WATCHDOG_ERROR);
?>

 
 

Drupal is a registered trademark of Dries Buytaert.