summaryrefslogtreecommitdiffstats
path: root/lib/private/comments/manager.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/private/comments/manager.php')
-rw-r--r--lib/private/comments/manager.php4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/private/comments/manager.php b/lib/private/comments/manager.php
index 64013a9e11f..64977c48895 100644
--- a/lib/private/comments/manager.php
+++ b/lib/private/comments/manager.php
@@ -58,7 +58,9 @@ class Manager implements ICommentsManager {
$data['parent_id'] = strval($data['parent_id']);
$data['topmost_parent_id'] = strval($data['topmost_parent_id']);
$data['creation_timestamp'] = new \DateTime($data['creation_timestamp']);
- $data['latest_child_timestamp'] = new \DateTime($data['latest_child_timestamp']);
+ if (!is_null($data['latest_child_timestamp'])) {
+ $data['latest_child_timestamp'] = new \DateTime($data['latest_child_timestamp']);
+ }
$data['children_count'] = intval($data['children_count']);
return $data;
}