[admin settings] only retrieve log file size if file exists

* fixes #17467
This commit is contained in:
Morris Jobke 2015-07-29 20:41:34 +02:00
parent b5ea97ef81
commit 8184527760
1 changed files with 4 additions and 1 deletions

View File

@ -46,7 +46,10 @@ $entriesRemaining = count($entries) > $numEntriesToLoad;
$entries = array_slice($entries, 0, $numEntriesToLoad); $entries = array_slice($entries, 0, $numEntriesToLoad);
$logFilePath = OC_Log_Owncloud::getLogFilePath(); $logFilePath = OC_Log_Owncloud::getLogFilePath();
$doesLogFileExist = file_exists($logFilePath); $doesLogFileExist = file_exists($logFilePath);
$logFileSize = 0;
if($doesLogFileExist) {
$logFileSize = filesize($logFilePath); $logFileSize = filesize($logFilePath);
}
$config = \OC::$server->getConfig(); $config = \OC::$server->getConfig();
$appConfig = \OC::$server->getAppConfig(); $appConfig = \OC::$server->getAppConfig();
$request = \OC::$server->getRequest(); $request = \OC::$server->getRequest();