From c5402f457530577999d1adc1715c76e742ad8aa9 Mon Sep 17 00:00:00 2001 From: Robin Appelman Date: Mon, 19 Aug 2013 12:04:53 +0200 Subject: use strict equals in readdir loops to prevent issues with '0' files --- lib/connector/sabre/objecttree.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/connector') diff --git a/lib/connector/sabre/objecttree.php b/lib/connector/sabre/objecttree.php index c4ddcbecbb8..b298813a202 100644 --- a/lib/connector/sabre/objecttree.php +++ b/lib/connector/sabre/objecttree.php @@ -88,7 +88,7 @@ class ObjectTree extends \Sabre_DAV_ObjectTree { } else { Filesystem::mkdir($destination); $dh = Filesystem::opendir($source); - while ($subnode = readdir($dh)) { + while (($subnode = readdir($dh)) !== false) { if ($subnode == '.' || $subnode == '..') continue; $this->copy($source . '/' . $subnode, $destination . '/' . $subnode); -- cgit v1.2.3