]> source.dussan.org Git - nextcloud-server.git/commitdiff
Make sure name and path are strings 36375/head
authorJoas Schilling <coding@schilljs.com>
Thu, 2 Feb 2023 10:50:29 +0000 (11:50 +0100)
committerJoas Schilling <coding@schilljs.com>
Thu, 2 Feb 2023 11:05:22 +0000 (12:05 +0100)
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 <coding@schilljs.com>
lib/private/Files/Cache/Cache.php

index 380e4427e7d69133b87b6d5a14143c4393546db9..6440bf05a1dc1ccc4f6af76a2be33673a4774b4c 100644 (file)
@@ -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'];