summaryrefslogtreecommitdiffstats
path: root/lib/files/storage
diff options
context:
space:
mode:
Diffstat (limited to 'lib/files/storage')
-rw-r--r--lib/files/storage/common.php6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/files/storage/common.php b/lib/files/storage/common.php
index 3da13ac4df0..1a273240eeb 100644
--- a/lib/files/storage/common.php
+++ b/lib/files/storage/common.php
@@ -142,7 +142,7 @@ abstract class Common implements \OC\Files\Storage\Storage {
return false;
} else {
$directoryHandle = $this->opendir($directory);
- while ($contents = readdir($directoryHandle)) {
+ while (($contents = readdir($directoryHandle)) !== false) {
if (!\OC\Files\Filesystem::isIgnoredDir($contents)) {
$path = $directory . '/' . $contents;
if ($this->is_dir($path)) {
@@ -225,7 +225,7 @@ abstract class Common implements \OC\Files\Storage\Storage {
private function addLocalFolder($path, $target) {
if ($dh = $this->opendir($path)) {
- while ($file = readdir($dh)) {
+ while (($file = readdir($dh)) !== false) {
if ($file !== '.' and $file !== '..') {
if ($this->is_dir($path . '/' . $file)) {
mkdir($target . '/' . $file);
@@ -243,7 +243,7 @@ abstract class Common implements \OC\Files\Storage\Storage {
$files = array();
$dh = $this->opendir($dir);
if ($dh) {
- while ($item = readdir($dh)) {
+ while (($item = readdir($dh)) !== false) {
if ($item == '.' || $item == '..') continue;
if (strstr(strtolower($item), strtolower($query)) !== false) {
$files[] = $dir . '/' . $item;