aboutsummaryrefslogtreecommitdiffstats
path: root/lib/private/legacy
diff options
context:
space:
mode:
authorCôme Chilliet <come.chilliet@nextcloud.com>2024-04-29 17:13:10 +0200
committerCôme Chilliet <come.chilliet@nextcloud.com>2024-04-30 09:38:47 +0200
commited4603c5aaab91c56ba49728046504f6e49c53d3 (patch)
tree8a85acc257c6c2428830e6de6b4f87acbb2d8f5c /lib/private/legacy
parentaf728c5ff69b3de0ea6bbbb65f9a7e639273ebd1 (diff)
downloadnextcloud-server-ed4603c5aaab91c56ba49728046504f6e49c53d3.tar.gz
nextcloud-server-ed4603c5aaab91c56ba49728046504f6e49c53d3.zip
fix: Fix small psalm errors in legacy
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
Diffstat (limited to 'lib/private/legacy')
-rw-r--r--lib/private/legacy/OC_Files.php2
-rw-r--r--lib/private/legacy/OC_Helper.php2
2 files changed, 2 insertions, 2 deletions
diff --git a/lib/private/legacy/OC_Files.php b/lib/private/legacy/OC_Files.php
index 1b2f83941c8..7e6d8632642 100644
--- a/lib/private/legacy/OC_Files.php
+++ b/lib/private/legacy/OC_Files.php
@@ -104,7 +104,7 @@ class OC_Files {
* return the content of a file or return a zip file containing multiple files
*
* @param string $dir
- * @param string $files ; separated list of files to download
+ * @param string|array $files ; separated list of files to download
* @param array $params ; 'head' boolean to only send header of the request ; 'range' http range header
*/
public static function get($dir, $files, $params = null) {
diff --git a/lib/private/legacy/OC_Helper.php b/lib/private/legacy/OC_Helper.php
index 9a12bd50e0e..7c9810e9081 100644
--- a/lib/private/legacy/OC_Helper.php
+++ b/lib/private/legacy/OC_Helper.php
@@ -138,7 +138,7 @@ class OC_Helper {
$bytes = (float)$str;
- if (preg_match('#([kmgtp]?b?)$#si', $str, $matches) && !empty($bytes_array[$matches[1]])) {
+ if (preg_match('#([kmgtp]?b?)$#si', $str, $matches) && isset($bytes_array[$matches[1]])) {
$bytes *= $bytes_array[$matches[1]];
} else {
return false;