diff --git a/ecrire/inc/statistiques.php b/ecrire/inc/statistiques.php
index 2f5d625f7665d447dd29fa6d4272e5762686e41f..7e42c4a90be0a02d033adaf2ba72ff34282cbc18 100644
--- a/ecrire/inc/statistiques.php
+++ b/ecrire/inc/statistiques.php
@@ -609,6 +609,7 @@ function statistiques_forums_dist($duree, $interval, $type, $id_article, $serveu
 	$order = 'date_heure';
 	$interval = 24 * 3600;
 	$oldscore = 420;
+	$oldlog = array();
 	while ($interval >= 1) {
 		$log = statistiques_collecte_date('COUNT(*)', "(FLOOR(UNIX_TIMESTAMP($order) / $interval) *  $interval)", 'spip_forum', $where, $serveur);
 		if (count($log) > 3) break;