fix: Fix small psalm errors in legacy

Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
pull/44533/head
Côme Chilliet 3 weeks ago
parent af728c5ff6
commit ed4603c5aa
No known key found for this signature in database
GPG Key ID: A3E2F658B28C760A

@ -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) {

@ -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;

Loading…
Cancel
Save