Fix [ch15188] 500 error

This commit is contained in:
Ivan Nieto 2020-09-15 03:51:10 -05:00
parent 912401a0a0
commit 501d5680ea

View file

@ -186,7 +186,7 @@ class SettingsController extends Controller
Auth::login($user, true); Auth::login($user, true);
$settings->save(); $settings->save();
if ('1' == get('email_creds')) { if ($request->input('email_creds') == '1') {
$data = []; $data = [];
$data['email'] = $user->email; $data['email'] = $user->email;
$data['username'] = $user->username; $data['username'] = $user->username;
@ -347,7 +347,7 @@ class SettingsController extends Controller
$setting->depreciation_method = $request->input('depreciation_method'); $setting->depreciation_method = $request->input('depreciation_method');
if ('' != get('per_page')) { if ($request->input('per_page') != '') {
$setting->per_page = $request->input('per_page'); $setting->per_page = $request->input('per_page');
} else { } else {
$setting->per_page = 200; $setting->per_page = 200;
@ -1149,7 +1149,7 @@ class SettingsController extends Controller
public function postPurge(Request $request) public function postPurge(Request $request)
{ {
if (! config('app.lock_passwords')) { if (! config('app.lock_passwords')) {
if ('DELETE' == $request->get('confirm_purge')) { if ('DELETE' == $request->input('confirm_purge')) {
// Run a backup immediately before processing // Run a backup immediately before processing
Artisan::call('backup:run'); Artisan::call('backup:run');
Artisan::call('snipeit:purge', ['--force' => 'true', '--no-interaction' => true]); Artisan::call('snipeit:purge', ['--force' => 'true', '--no-interaction' => true]);