Watchdog arguments changed in Drupal 6
Dave Reid - August 25, 2008 - 19:40
| Project: | Demonstration site (Sandbox / Snapshot) |
| Version: | 6.x-1.x-dev |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed |
Description
I get the following errors only when viewing 'demo' log entries:
* warning: Invalid argument supplied for foreach() in /home/.katona/davereid20/drupal-6/includes/common.inc on line 789.
* warning: strtr() [function.strtr]: The second argument is not an array in /home/.katona/davereid20/drupal-6/includes/common.inc on line 806.
Looked into the code, the changes to the watchdog API from 5 to 6 didn't get changed in demo.module. The offending lines of code:
watchdog('demo', $message, $success ? WATCHDOG_NOTICE : WATCHDOG_ERROR);
watchdog('demo', $message, WATCHDOG_ERROR);The third parameter should be array() and then the status code.

#1
Please test attached patch.
#2
Committed.
#3
Sorry...I didn't follow up to say the patch worked fine. Thanks!
#4
Thanks greggles! Any word on #299548: Line breaks not showing up in email?
#5
Arg...Firefox crashed and posted that to the wrong issue queue. Sorry.
#6
Automatically closed -- issue fixed for two weeks with no activity.