mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-09-24 22:48:18 +00:00
Include safe methods and require the correct package.
This commit is contained in:
@@ -139,7 +139,7 @@ class DebugController extends Controller
|
||||
if ($handler instanceof RotatingFileHandler) {
|
||||
$logFile = $handler->getUrl();
|
||||
if (null !== $logFile && file_exists($logFile)) {
|
||||
$logContent = file_get_contents($logFile);
|
||||
$logContent = \Safe\file_get_contents($logFile);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -164,8 +164,8 @@ class DebugController extends Controller
|
||||
|
||||
private function getSystemInformation(): array
|
||||
{
|
||||
$maxFileSize = Steam::phpBytes((string) ini_get('upload_max_filesize'));
|
||||
$maxPostSize = Steam::phpBytes((string) ini_get('post_max_size'));
|
||||
$maxFileSize = Steam::phpBytes((string) \Safe\ini_get('upload_max_filesize'));
|
||||
$maxPostSize = Steam::phpBytes((string) \Safe\ini_get('post_max_size'));
|
||||
$drivers = DB::availableDrivers();
|
||||
$currentDriver = DB::getDriverName();
|
||||
|
||||
@@ -177,8 +177,8 @@ class DebugController extends Controller
|
||||
'interface' => \PHP_SAPI,
|
||||
'bits' => \PHP_INT_SIZE * 8,
|
||||
'bcscale' => bcscale(),
|
||||
'display_errors' => ini_get('display_errors'),
|
||||
'error_reporting' => $this->errorReporting((int) ini_get('error_reporting')),
|
||||
'display_errors' => \Safe\ini_get('display_errors'),
|
||||
'error_reporting' => $this->errorReporting((int) \Safe\ini_get('error_reporting')),
|
||||
'upload_size' => min($maxFileSize, $maxPostSize),
|
||||
'all_drivers' => $drivers,
|
||||
'current_driver' => $currentDriver,
|
||||
@@ -197,7 +197,7 @@ class DebugController extends Controller
|
||||
|
||||
try {
|
||||
if (file_exists('/var/www/counter-main.txt')) {
|
||||
$return['build'] = trim((string) file_get_contents('/var/www/counter-main.txt'));
|
||||
$return['build'] = trim((string) \Safe\file_get_contents('/var/www/counter-main.txt'));
|
||||
app('log')->debug(sprintf('build is now "%s"', $return['build']));
|
||||
}
|
||||
} catch (\Exception $e) {
|
||||
@@ -207,7 +207,7 @@ class DebugController extends Controller
|
||||
|
||||
try {
|
||||
if (file_exists('/var/www/build-date-main.txt')) {
|
||||
$return['build_date'] = trim((string) file_get_contents('/var/www/build-date-main.txt'));
|
||||
$return['build_date'] = trim((string) \Safe\file_get_contents('/var/www/build-date-main.txt'));
|
||||
}
|
||||
} catch (\Exception $e) {
|
||||
app('log')->debug('Could not check build date, but thats ok.');
|
||||
|
Reference in New Issue
Block a user