From: Michael Gapczynski Date: Tue, 5 Jun 2012 21:44:07 +0000 (-0400) Subject: Supress any warnings if log file does not exist X-Git-Tag: v4.5.0beta1~74^2~424^2~8 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=3ce6344d40385e38335fb9716233cbf7c5241860;p=nextcloud-server.git Supress any warnings if log file does not exist --- diff --git a/lib/log/owncloud.php b/lib/log/owncloud.php index 5913d8b5b83..92914af8fca 100644 --- a/lib/log/owncloud.php +++ b/lib/log/owncloud.php @@ -63,7 +63,7 @@ class OC_Log_Owncloud { self::init(); $minLevel=OC_Config::getValue( "loglevel", OC_Log::WARN ); $entries = array(); - $handle = fopen(self::$logFile, 'r'); + $handle = @fopen(self::$logFile, 'r'); if ($handle) { // Just a guess to set the file pointer to the right spot $maxLineLength = 150;