Verified Commit 84cbfe91 authored by Côme Chilliet's avatar Côme Chilliet
Browse files

:ambulance: fix(sinaps) Fix handling of empty end of contract date

An empty date was wrongly seen as today date

issue #5903
Showing with 1 addition and 1 deletion
+1 -1
......@@ -103,7 +103,7 @@ class sinapsUser extends simplePlugin
}
$contractEnded = FALSE;
if (isset($this->parent->by_object['personalInfo'])) {
if (isset($this->parent->by_object['personalInfo']) && ($this->parent->by_object['personalInfo']->attributesAccess['fdContractEndDate']->getValue() != '')) {
$fdContractEndDate = $this->parent->by_object['personalInfo']->attributesAccess['fdContractEndDate']->getDateValue();
$tomorrow = new DateTime('tomorrow');
if ($fdContractEndDate < $tomorrow) {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment