From 996a065a24f24b0ceb773d93aa7cfb72ab932a06 Mon Sep 17 00:00:00 2001 From: ma0068 Date: Wed, 24 Sep 2025 17:18:07 +0200 Subject: [PATCH] Add validation Datumsfeld: check valid date --- include/entwicklungsteam.class.php | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/include/entwicklungsteam.class.php b/include/entwicklungsteam.class.php index 648f7e2a5..fd3dd782f 100644 --- a/include/entwicklungsteam.class.php +++ b/include/entwicklungsteam.class.php @@ -168,6 +168,21 @@ class entwicklungsteam extends basis_db $this->errormsg = 'Endedatum darf nicht vor Anfangsdatum liegen'; return false; } + + $beginnParts = explode('-', $this->beginn); + if (!checkdate((int)$beginnParts[1], (int)$beginnParts[2], (int)$beginnParts[0])) + { + $this->errormsg = 'Anfangsdatum ist ungültig'; + return false; + } + + $endeParts = explode('-', $this->ende); + if (!checkdate((int)$endeParts[1], (int)$endeParts[2], (int)$endeParts[0])) + { + $this->errormsg = 'Endedatum ist ungültig'; + return false; + } + return true; }