mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-02-25 18:45:27 -06:00
Catch error when trying to read (non-existent) logs.
This commit is contained in:
parent
6799268ec4
commit
ce854fbb43
@ -25,6 +25,7 @@ namespace FireflyIII\Http\Controllers;
|
|||||||
|
|
||||||
use Carbon\Carbon;
|
use Carbon\Carbon;
|
||||||
use DB;
|
use DB;
|
||||||
|
use Exception;
|
||||||
use FireflyIII\Http\Middleware\IsDemoUser;
|
use FireflyIII\Http\Middleware\IsDemoUser;
|
||||||
use Illuminate\Http\Request;
|
use Illuminate\Http\Request;
|
||||||
use Log;
|
use Log;
|
||||||
@ -84,7 +85,11 @@ class DebugController extends Controller
|
|||||||
if ($handler instanceof RotatingFileHandler) {
|
if ($handler instanceof RotatingFileHandler) {
|
||||||
$logFile = $handler->getUrl();
|
$logFile = $handler->getUrl();
|
||||||
if (null !== $logFile) {
|
if (null !== $logFile) {
|
||||||
$logContent = file_get_contents($logFile);
|
try {
|
||||||
|
$logContent = file_get_contents('/aaaa/'.$logFile);
|
||||||
|
} catch(Exception $e) {
|
||||||
|
// don't care
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user