Fix ErrorException: Object of class EGroupware\Api\DateTime could not be converted to string

It's happening as we removed __toString method from Api\DateTime to allow again direct comparing with comparison operators
This commit is contained in:
Ralf Becker 2021-03-02 09:37:43 +02:00
parent 9691a14279
commit b1af8449fd

View File

@ -533,7 +533,9 @@ abstract class Tracking
if ($data[$name] == $old[$name]) continue;
}
}
elseif (str_replace("\r", '', $old[$name]) == str_replace("\r", '', $data[$name]))
elseif ($old[$name] == $data[$name] ||
is_a($data[$name], \DateTime) ? (new Api\DateTime($old[$name], $data[$name]->getTimezone())) == $data[$name] :
str_replace("\r", '', $old[$name]) == str_replace("\r", '', $data[$name]))
{
continue; // change only in CR (eg. different OS) --> ignore
}