diff options
author | Thomas Müller <thomas.mueller@tmit.eu> | 2014-04-10 17:37:53 +0200 |
---|---|---|
committer | Thomas Müller <thomas.mueller@tmit.eu> | 2014-04-10 17:37:53 +0200 |
commit | e401df26bcfabd5aeef5634cdf341145379defdb (patch) | |
tree | c4c991ff2d14217dfa6e43a0a866d7bb6b7be8a6 | |
parent | 7325aefbd15faf2d30c45fefa99b39d50b6b3125 (diff) | |
parent | 4f11786a3d0d88a3bf43ae56cc9bb7a3023c83fb (diff) | |
download | nextcloud-server-e401df26bcfabd5aeef5634cdf341145379defdb.tar.gz nextcloud-server-e401df26bcfabd5aeef5634cdf341145379defdb.zip |
Merge pull request #8107 from owncloud/dav-negativetimestampfix
Fixed Sabre Node implementation to correctly return timestamps as int
-rw-r--r-- | lib/private/connector/sabre/node.php | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/lib/private/connector/sabre/node.php b/lib/private/connector/sabre/node.php index 5807c5c7f71..7ff9f50ca68 100644 --- a/lib/private/connector/sabre/node.php +++ b/lib/private/connector/sabre/node.php @@ -139,12 +139,15 @@ abstract class OC_Connector_Sabre_Node implements Sabre_DAV_INode, Sabre_DAV_IPr /** * @brief Returns the last modification time, as a unix timestamp - * @return int + * @return int timestamp as integer */ public function getLastModified() { $this->getFileinfoCache(); - return $this->fileinfo_cache['mtime']; - + $timestamp = $this->fileinfo_cache['mtime']; + if (!empty($timestamp)) { + return (int)$timestamp; + } + return $timestamp; } /** |