From 9256fe9fbab0f970b458280d03e620605bff8130 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Andreas=20=C3=85kre=20Solberg?= <andreas.solberg@uninett.no>
Date: Wed, 25 Feb 2009 12:13:45 +0000
Subject: [PATCH] throw error when aggregated file was empty...

git-svn-id: https://simplesamlphp.googlecode.com/svn/trunk@1326 44740490-163a-0410-bde0-09ae8108e29a
---
 modules/statistics/www/showstats.php | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/modules/statistics/www/showstats.php b/modules/statistics/www/showstats.php
index aa0c67b0f..9ca6399f7 100644
--- a/modules/statistics/www/showstats.php
+++ b/modules/statistics/www/showstats.php
@@ -71,8 +71,8 @@ if (!is_readable($resultFileName))
 	throw new Exception('Could not read statitics file [' . $resultFileName . ']. Bad file permissions?');
 $resultfile = file_get_contents($resultFileName);
 $results = unserialize($resultfile);
-
-
+if (empty($results))
+	throw new Exception('Aggregated statistics in file [' . $resultFileName . '] was empty.');
 
 $dataset = array();
 $axis = array();
-- 
GitLab