From d29ccd1764aa4519f9f35d42b73e4a644618d728 Mon Sep 17 00:00:00 2001 From: Dries Buytaert Date: Thu, 13 May 2010 08:22:31 +0000 Subject: - Patch #782240 by Pasqualle: invalid argument supplied for foreach() in _block_rehash(). --- modules/statistics/statistics.module | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'modules/statistics/statistics.module') diff --git a/modules/statistics/statistics.module b/modules/statistics/statistics.module index 59e112b38..fce5f6acf 100644 --- a/modules/statistics/statistics.module +++ b/modules/statistics/statistics.module @@ -304,12 +304,14 @@ function statistics_get($nid) { * Implements hook_block_info(). */ function statistics_block_info() { + $blocks = array(); + if (variable_get('statistics_count_content_views', 0)) { $blocks['popular']['info'] = t('Popular content'); // Too dynamic to cache. $blocks['popular']['cache'] = DRUPAL_NO_CACHE; - return $blocks; } + return $blocks; } /** -- cgit v1.2.3