[Pkg-owncloud-commits] [php-sabredav] 08/21: Properly concatenate $path, even if it's "0"

David Prévot taffit at moszumanska.debian.org
Fri Jul 3 20:11:23 UTC 2015


This is an automated email from the git hooks/post-receive script.

taffit pushed a commit to branch master
in repository php-sabredav.

commit 671b485b2cfe6e5a36e627ec0a63b8ccd3da4adf
Author: Vincent Petry <PVince81 at yahoo.fr>
Date:   Wed Jun 17 11:54:00 2015 +0200

    Properly concatenate $path, even if it's "0"
---
 lib/DAV/Server.php | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/lib/DAV/Server.php b/lib/DAV/Server.php
index 80a285e..0d9cf8f 100644
--- a/lib/DAV/Server.php
+++ b/lib/DAV/Server.php
@@ -848,7 +848,11 @@ class Server extends EventEmitter {
         foreach ($this->tree->getChildren($path) as $childNode) {
             $subPropFind = clone $propFind;
             $subPropFind->setDepth($newDepth);
-            $subPath = $path ? $path . '/' . $childNode->getName() : $childNode->getName();
+            if ($path !== '') {
+                $subPath = $path . '/' . $childNode->getName();
+            } else {
+                $subPath = $childNode->getName();
+            }
             $subPropFind->setPath($subPath);
 
             $propFindRequests[] = [

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/php-sabredav.git



More information about the Pkg-owncloud-commits mailing list