aboutsummaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authoryemkareems <yemkareems@gmail.com>2024-11-13 15:16:56 +0530
committerGitHub <noreply@github.com>2024-11-13 15:16:56 +0530
commit56ce5d03bd181966a5987488c0f30bc59daf9de3 (patch)
treee455fdccdff8a033e2e5dcfe1ffd7975485f8e58 /apps
parent05de3df5c50463df2e39964acc71f5c8528cb9c4 (diff)
parent3b336466e41182b6baa28989b3bc2086969ddc9e (diff)
downloadnextcloud-server-56ce5d03bd181966a5987488c0f30bc59daf9de3.tar.gz
nextcloud-server-56ce5d03bd181966a5987488c0f30bc59daf9de3.zip
Merge pull request #49241 from nextcloud/backport/38630/stable30
[stable30] Fix remaining readdir() calls in loops with undesirable false evaluation potential
Diffstat (limited to 'apps')
-rw-r--r--apps/files_external/lib/Lib/Storage/Swift.php4
-rw-r--r--apps/files_trashbin/lib/Trashbin.php2
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;
}