mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-07-23 09:52:22 +00:00
bugfix valid date
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user