From 0a0fd3377310ce4faa72568089746b12c28e0679 Mon Sep 17 00:00:00 2001 From: acsfer Date: Tue, 23 Nov 2021 21:33:28 +0100 Subject: 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 --- lib/private/Files/View.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib') 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; } -- cgit v1.2.3 From 97e1855ed5e31faab98f6f6b95182aa0442e6900 Mon Sep 17 00:00:00 2001 From: acsfer Date: Wed, 24 Nov 2021 11:55:06 +0100 Subject: Typo --- lib/private/Files/View.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib') diff --git a/lib/private/Files/View.php b/lib/private/Files/View.php index 25ea6261a38..4b7697f32b3 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 || isset($data['size']) && $data['size'] === -1) { + if (!$data || (isset($data['size']) && $data['size'] === -1)) { if (!$storage->file_exists($internalPath)) { return false; } -- cgit v1.2.3