From e7cbaf3ee323c9187356300012c8cfb3879b0349 Mon Sep 17 00:00:00 2001 From: Josh Richards Date: Sat, 3 Jun 2023 08:57:38 -0400 Subject: Clean-up some remaining readdir calls with undesirable false evaluation potential Signed-off-by: Josh Richards --- lib/private/Files/Storage/Common.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/private/Files/Storage/Common.php') diff --git a/lib/private/Files/Storage/Common.php b/lib/private/Files/Storage/Common.php index 5ab411434d0..15fe788a821 100644 --- a/lib/private/Files/Storage/Common.php +++ b/lib/private/Files/Storage/Common.php @@ -228,7 +228,7 @@ abstract class Common implements Storage, ILockingStorage, IWriteStreamStorage { $this->remove($target); $dir = $this->opendir($source); $this->mkdir($target); - while ($file = readdir($dir)) { + while (($file = readdir($dir)) !== false) { if (!Filesystem::isIgnoredDir($file)) { if (!$this->copy($source . '/' . $file, $target . '/' . $file)) { closedir($dir); -- cgit v1.2.3