]> source.dussan.org Git - nextcloud-server.git/commitdiff
Avoid Huge error message when unable to read log file
authorBrice Maron <brice@bmaron.net>
Sun, 6 Nov 2011 13:37:22 +0000 (14:37 +0100)
committerBrice Maron <brice@bmaron.net>
Sun, 6 Nov 2011 13:37:22 +0000 (14:37 +0100)
lib/log.php

index 98333be54fee5fcadeb73246eb75ad5d1775ddd5..446ddd48848c3809485245f11f78fb51624e0566 100644 (file)
@@ -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){