mirror of
https://github.com/friendica/friendica
synced 2025-04-28 21:04:22 +02:00
Fix for incorrect datetime values
This commit is contained in:
parent
f082f0da4f
commit
73efdb99e3
2 changed files with 11 additions and 2 deletions
|
@ -945,6 +945,15 @@ class PortableContact
|
|||
$register_policy = $gserver["register_policy"];
|
||||
$registered_users = $gserver["registered-users"];
|
||||
|
||||
// See discussion under https://forum.friendi.ca/display/0b6b25a8135aabc37a5a0f5684081633
|
||||
// It can happen that a zero date is in the database, but storing it again is forbidden.
|
||||
if ($last_contact < NULL_DATE) {
|
||||
$last_contact = NULL_DATE;
|
||||
}
|
||||
if ($last_failure < NULL_DATE) {
|
||||
$last_failure = NULL_DATE;
|
||||
}
|
||||
|
||||
if (!$force && !self::updateNeeded($gserver["created"], "", $last_failure, $last_contact)) {
|
||||
logger("Use cached data for server ".$server_url, LOGGER_DEBUG);
|
||||
return ($last_contact >= $last_failure);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue