From 7de591f5cc1cfadc5c2b0f88cded25578cd58350 Mon Sep 17 00:00:00 2001 From: Brice Maron Date: Sun, 6 Nov 2011 14:37:22 +0100 Subject: [PATCH] Avoid Huge error message when unable to read log file --- lib/log.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/log.php b/lib/log.php index 98333be54f..446ddd4884 100644 --- a/lib/log.php +++ b/lib/log.php @@ -59,6 +59,9 @@ class OC_Log{ return array(); } $fh=fopen($logFile,'r'); + if($fh === false){ // Unable to read log file! + return array(); + } while(!feof($fh)){ $line=fgets($fh); if($line){