From 05a708fb06137758cf7a15a623b4813af2fc005f Mon Sep 17 00:00:00 2001 From: Dries Buytaert Date: Wed, 31 Jan 2007 15:49:26 +0000 Subject: - Patch #112715 by chx, webchick, asimmonds, et al: fixing E_ALL notices. Thanks. --- modules/watchdog/watchdog.module | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'modules/watchdog/watchdog.module') diff --git a/modules/watchdog/watchdog.module b/modules/watchdog/watchdog.module index 39784a0bf..e26f48a64 100644 --- a/modules/watchdog/watchdog.module +++ b/modules/watchdog/watchdog.module @@ -174,11 +174,12 @@ function watchdog_top($type) { $result = pager_query("SELECT COUNT(wid) AS count, message FROM {watchdog} WHERE type = '%s' GROUP BY message ". tablesort_sql($header), 30, 0, "SELECT COUNT(DISTINCT(message)) FROM {watchdog} WHERE type = '%s'", $type); + $rows = array(); while ($watchdog = db_fetch_object($result)) { $rows[] = array($watchdog->count, truncate_utf8($watchdog->message, 56, TRUE, TRUE)); } - if (!$rows) { + if (empty($rows)) { $rows[] = array(array('data' => t('No log messages available.'), 'colspan' => 2)); } -- cgit v1.2.3