diff options
author | Josh Richards <josh.t.richards@gmail.com> | 2023-06-03 08:57:38 -0400 |
---|---|---|
committer | yemkareems <yemkareems@gmail.com> | 2024-11-13 09:11:17 +0530 |
commit | 1fc1543a8bcffa04f0c4d42ba2252409c8876041 (patch) | |
tree | 100e3e14795208077fc7e23245086e3b18cc2938 /apps | |
parent | 0da87f178f1db975a1c3f9212b99ac01f4bae874 (diff) | |
download | nextcloud-server-1fc1543a8bcffa04f0c4d42ba2252409c8876041.tar.gz nextcloud-server-1fc1543a8bcffa04f0c4d42ba2252409c8876041.zip |
fix: Clean-up some remaining readdir calls with undesirable false evaluation potential
Signed-off-by: Josh Richards <josh.t.richards@gmail.com>
Diffstat (limited to 'apps')
-rw-r--r-- | apps/files_external/lib/Lib/Storage/Swift.php | 4 | ||||
-rw-r--r-- | apps/files_trashbin/lib/Trashbin.php | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/apps/files_external/lib/Lib/Storage/Swift.php b/apps/files_external/lib/Lib/Storage/Swift.php index 1ae9659cd59..f25c3cb304b 100644 --- a/apps/files_external/lib/Lib/Storage/Swift.php +++ b/apps/files_external/lib/Lib/Storage/Swift.php @@ -228,7 +228,7 @@ class Swift extends \OC\Files\Storage\Common { } $dh = $this->opendir($path); - while ($file = readdir($dh)) { + while (($file = readdir($dh)) !== false) { if (\OC\Files\Filesystem::isIgnoredDir($file)) { continue; } @@ -494,7 +494,7 @@ class Swift extends \OC\Files\Storage\Common { } $dh = $this->opendir($source); - while ($file = readdir($dh)) { + while (($file = readdir($dh)) !== false) { if (\OC\Files\Filesystem::isIgnoredDir($file)) { continue; } diff --git a/apps/files_trashbin/lib/Trashbin.php b/apps/files_trashbin/lib/Trashbin.php index a8ecc363e64..fe16a3a9d69 100644 --- a/apps/files_trashbin/lib/Trashbin.php +++ b/apps/files_trashbin/lib/Trashbin.php @@ -1105,7 +1105,7 @@ class Trashbin { public static function isEmpty($user) { $view = new View('/' . $user . '/files_trashbin'); if ($view->is_dir('/files') && $dh = $view->opendir('/files')) { - while ($file = readdir($dh)) { + while (($file = readdir($dh)) !== false) { if (!Filesystem::isIgnoredDir($file)) { return false; } |