From 33a21003c591c1f957d2654e24981864f2c4443e Mon Sep 17 00:00:00 2001 From: Chris Date: Mon, 30 Oct 2023 22:45:42 +0100 Subject: [PATCH] error message --- web/pages/profile/controller.php | 9 ++++++++- web/pages/runs/run.html | 12 ------------ 2 files changed, 8 insertions(+), 13 deletions(-) diff --git a/web/pages/profile/controller.php b/web/pages/profile/controller.php index 931f281..c8ea630 100644 --- a/web/pages/profile/controller.php +++ b/web/pages/profile/controller.php @@ -62,7 +62,14 @@ class Profile extends Page { if($newphoto) $_SESSION['user']->data['photo'] = $newphoto; - $_SESSION['user']->save(); + try{ + $_SESSION['user']->save(); + } + catch(Exception $e) + { + return partial('error.html', ['errorMessage' => 'Fehler beim Speichern des Profils: '.$e->getMessage()]); + } + $this->redirect('/profile'); } diff --git a/web/pages/runs/run.html b/web/pages/runs/run.html index ba26e29..eeefba2 100644 --- a/web/pages/runs/run.html +++ b/web/pages/runs/run.html @@ -32,18 +32,6 @@ - -
- 0): ?>
Admins
- - <?= escape($adm['name']); ?> - - - 0): ?>
Mitglieder
- - <?= escape($member['name']); ?> - -