diff --git a/lib/Model/Circle.php b/lib/Model/Circle.php index 03c54e394..c1f026f5e 100644 --- a/lib/Model/Circle.php +++ b/lib/Model/Circle.php @@ -912,7 +912,9 @@ public function importFromDatabase(array $data, string $prefix = ''): IQueryRow ->setDescription($this->get($prefix . 'description', $data)); $creation = $this->get($prefix . 'creation', $data); - $this->setCreation(DateTime::createFromFormat('Y-m-d H:i:s', $creation)->getTimestamp()); + $dateTime = DateTime::createFromFormat('Y-m-d H:i:s', $creation); + $timestamp = $dateTime ? $dateTime->getTimestamp() : (int) strtotime('Y-m-d H:i:s', $creation); + $this->setCreation($timestamp); $this->setPopulation($this->getInt('population', $this->getSettings())); $this->setPopulationInherited($this->getInt('populationInherited', $this->getSettings()));