Project:Demonstration site (Sandbox / Snapshot)
Version:6.x-1.x-dev
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:closed (fixed)

Issue Summary

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.

Comments

#1

Status:active» needs review

Please test attached patch.

AttachmentSize
demo-DRUPAL-6--1.watchdog.patch 961 bytes

#2

Status:needs review» fixed

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

Status:fixed» closed (fixed)

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

nobody click here