Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoracsfer <carlos@reendex.com>2021-11-23 23:33:28 +0300
committerGitHub <noreply@github.com>2021-11-23 23:33:28 +0300
commit0a0fd3377310ce4faa72568089746b12c28e0679 (patch)
tree249899abe5bed736998540661f005f12ad635cf3 /lib/private/Files/View.php
parentfd487c1a43874bf7eaeebe2ff822e18978b6d1e1 (diff)
Check if size value is set
Using `isset()` as it does not return true for array keys that correspond to a `null` value, while `array_key_exists()` does. Fix #29865
Diffstat (limited to 'lib/private/Files/View.php')
-rw-r--r--lib/private/Files/View.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/private/Files/View.php b/lib/private/Files/View.php
index f2d91065b9a..25ea6261a38 100644
--- a/lib/private/Files/View.php
+++ b/lib/private/Files/View.php
@@ -1340,7 +1340,7 @@ class View {
try {
// if the file is not in the cache or needs to be updated, trigger the scanner and reload the data
- if (!$data || $data['size'] === -1) {
+ if (!$data || isset($data['size']) && $data['size'] === -1) {
if (!$storage->file_exists($internalPath)) {
return false;
}