diff --git a/app/Http/Controllers/SettingsController.php b/app/Http/Controllers/SettingsController.php index c5c36d7b81..7e682ae773 100755 --- a/app/Http/Controllers/SettingsController.php +++ b/app/Http/Controllers/SettingsController.php @@ -455,8 +455,9 @@ class SettingsController extends Controller // Default avatar upload $setting = $request->handleImages($setting, 500, 'default_avatar', 'avatars', 'default_avatar'); - if ($request->input('clear_default_avatar') == '1') { + if (($request->input('clear_default_avatar') == '1') && ($setting->default_avatar!='default.png')) { + \Log::debug('Deleting default avatar'); if (($setting->default_avatar) && (Storage::exists('avatars/'.$setting->default_avatar))) { Storage::disk('public')->delete('avatars/'.$setting->default_avatar); }