From: Joas Schilling Date: Thu, 2 Feb 2023 10:50:29 +0000 (+0100) Subject: Make sure name and path are strings X-Git-Tag: v26.0.0beta2~7^2 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=4bdc5834fa7d13c53c8f64b33646309062490954;p=nextcloud-server.git Make sure name and path are strings Otherwise Oracle returns NULL for empty strings and PHP 8.2 throws on null in string functions like trim() and md5() Signed-off-by: Joas Schilling --- diff --git a/lib/private/Files/Cache/Cache.php b/lib/private/Files/Cache/Cache.php index 380e4427e7d..6440bf05a1d 100644 --- a/lib/private/Files/Cache/Cache.php +++ b/lib/private/Files/Cache/Cache.php @@ -186,6 +186,8 @@ class Cache implements ICache { */ public static function cacheEntryFromData($data, IMimeTypeLoader $mimetypeLoader) { //fix types + $data['name'] = (string)$data['name']; + $data['path'] = (string)$data['path']; $data['fileid'] = (int)$data['fileid']; $data['parent'] = (int)$data['parent']; $data['size'] = 0 + $data['size'];