]> source.dussan.org Git - nextcloud-server.git/commitdiff
Cast '{DAV:}getcontentlength' to number instead of int.
authorAndreas Fischer <bantu@owncloud.com>
Sun, 16 Feb 2014 13:42:59 +0000 (14:42 +0100)
committerAndreas Fischer <bantu@owncloud.com>
Thu, 29 May 2014 14:26:02 +0000 (16:26 +0200)
lib/private/connector/sabre/file.php
lib/private/connector/sabre/server.php

index ab9d3e47d0e405173c9ae889c122640f32ee869d..8a16ba55e7a92d03290892464220ec76ce28572f 100644 (file)
@@ -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();
index 2660b043f467e38562c534ab33771f5ab62c44fe..cf28b11163f44d3be9b5a64a2522b57f59b8a355 100644 (file)
@@ -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;