From 75af8a760c926760f172c221d8ecb699921a1752 Mon Sep 17 00:00:00 2001 From: ma0068 Date: Tue, 30 Sep 2025 14:07:25 +0200 Subject: [PATCH] bugfix valid date --- include/entwicklungsteam.class.php | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/include/entwicklungsteam.class.php b/include/entwicklungsteam.class.php index fd3dd782f..a91ff10be 100644 --- a/include/entwicklungsteam.class.php +++ b/include/entwicklungsteam.class.php @@ -169,18 +169,23 @@ class entwicklungsteam extends basis_db return false; } - $beginnParts = explode('-', $this->beginn); - if (!checkdate((int)$beginnParts[1], (int)$beginnParts[2], (int)$beginnParts[0])) + if($this->beginn != '') { - $this->errormsg = 'Anfangsdatum ist ungültig'; - 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])) + if($this->ende != '') { - $this->errormsg = 'Endedatum 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;