summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorArthur Schiwon <blizzz@owncloud.com>2016-01-11 18:09:00 +0100
committerArthur Schiwon <blizzz@owncloud.com>2016-01-26 12:10:14 +0100
commited546bd2a591d0d9029e9f3989e159f8b1e4e8c5 (patch)
treef0d0126c7f43cea0191b2dda78d5a832767cc822 /lib
parent3da78c8f1c9355a726f289e834fa237366c3df20 (diff)
downloadnextcloud-server-ed546bd2a591d0d9029e9f3989e159f8b1e4e8c5.tar.gz
nextcloud-server-ed546bd2a591d0d9029e9f3989e159f8b1e4e8c5.zip
Comments DAV implementation
Diffstat (limited to 'lib')
-rw-r--r--lib/private/comments/comment.php4
-rw-r--r--lib/private/comments/manager.php4
2 files changed, 5 insertions, 3 deletions
diff --git a/lib/private/comments/comment.php b/lib/private/comments/comment.php
index 1e1514a5872..75964603f9f 100644
--- a/lib/private/comments/comment.php
+++ b/lib/private/comments/comment.php
@@ -284,9 +284,9 @@ class Comment implements IComment {
}
/**
- * returns the timestamp of the most recent child
+ * returns the DateTime of the most recent child, if set, otherwise null
*
- * @return int
+ * @return \DateTime|null
* @since 9.0.0
*/
public function getLatestChildDateTime() {
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;
}