Plugins bei fehlender Klasse nicht dauerhaft deaktivieren, Speichern-Abstand im Admin, Profilbild-Fehlermeldung
Some checks failed
CI / PHP 8.4 / mariadb:10.6 (pull_request) Successful in 3m4s
CI / PHP 8.3 / mariadb:10.6 (pull_request) Successful in 3m8s
CI / PHP 8.3 / mariadb:11.4 (pull_request) Successful in 3m32s
CI / PHP 8.4 / mariadb:11.4 (pull_request) Successful in 3m35s
CI / PHP 8.3 / mysql:8.0 (pull_request) Successful in 5m7s
CI / PHP 8.4 / mysql:8.0 (pull_request) Successful in 5m1s
CI / PHP 8.3 / mysql:8.4 (pull_request) Successful in 5m30s
CI / PHP 8.4 / mysql:8.4 (pull_request) Successful in 5m31s
CI / Build-Artefakte aktuell (pull_request) Failing after 1m26s

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
Friederich Loheide 2026-09-26 18:28:03 +00:00
parent 201c86d486
commit 293d7f86a4
104 changed files with 552 additions and 409 deletions

View file

@ -11,8 +11,10 @@ use Illuminate\Http\RedirectResponse;
use Illuminate\Http\Request;
use Illuminate\Validation\Rule;
use Illuminate\Validation\Rules\File;
use Illuminate\Validation\ValidationException;
use Inertia\Inertia;
use Inertia\Response;
use Throwable;
class ProfileController extends Controller
{
@ -63,7 +65,17 @@ class ProfileController extends Controller
'avatar' => ['required', File::image()->types(['jpg', 'jpeg', 'png', 'webp'])->max(8 * 1024)],
]);
$avatars->store($request->user(), $request->file('avatar'));
try {
$avatars->store($request->user(), $request->file('avatar'));
} catch (Throwable $e) {
// Meist eine Server-Einschränkung (GD ohne WebP, Upload-Ordner schreibgeschützt,
// zu wenig Speicher) – verständliche Meldung statt „500 Interner Fehler“.
report($e);
throw ValidationException::withMessages([
'avatar' => 'Das Bild konnte nicht gespeichert werden. Bitte ein anderes Foto versuchen oder die Administration informieren (Details unter „Systemzustand“ und im Fehlerprotokoll).',
]);
}
return back()->with('status', 'avatar-updated');
}