summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndreas Fischer <bantu@owncloud.com>2014-02-16 14:42:59 +0100
committerAndreas Fischer <bantu@owncloud.com>2014-05-29 16:26:02 +0200
commitfb4556033a9d39698dbc15b59f3ba76ef6510e33 (patch)
tree1a9f6498e014e979802a69fa347308eca5f6023f
parent0bae68017ee93ec087e04acce83f189f5c3eeea7 (diff)
downloadnextcloud-server-fb4556033a9d39698dbc15b59f3ba76ef6510e33.tar.gz
nextcloud-server-fb4556033a9d39698dbc15b59f3ba76ef6510e33.zip
Cast '{DAV:}getcontentlength' to number instead of int.
-rw-r--r--lib/private/connector/sabre/file.php2
-rw-r--r--lib/private/connector/sabre/server.php2
2 files changed, 2 insertions, 2 deletions
diff --git a/lib/private/connector/sabre/file.php b/lib/private/connector/sabre/file.php
index ab9d3e47d0e..8a16ba55e7a 100644
--- a/lib/private/connector/sabre/file.php
+++ b/lib/private/connector/sabre/file.php
@@ -156,7 +156,7 @@ class OC_Connector_Sabre_File extends OC_Connector_Sabre_Node implements Sabre_D
/**
* Returns the size of the node, in bytes
*
- * @return int
+ * @return int|float
*/
public function getSize() {
return $this->info->getSize();
diff --git a/lib/private/connector/sabre/server.php b/lib/private/connector/sabre/server.php
index 2660b043f46..cf28b11163f 100644
--- a/lib/private/connector/sabre/server.php
+++ b/lib/private/connector/sabre/server.php
@@ -170,7 +170,7 @@ class OC_Connector_Sabre_Server extends Sabre_DAV_Server {
if ($node instanceof Sabre_DAV_IFile) {
$size = $node->getSize();
if (!is_null($size)) {
- $newProperties[200][$prop] = (int)$node->getSize();
+ $newProperties[200][$prop] = 0 + $size;
}
}
break;