summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorJoas Schilling <coding@schilljs.com>2023-02-02 11:50:29 +0100
committerJoas Schilling <coding@schilljs.com>2023-02-02 12:05:22 +0100
commit4bdc5834fa7d13c53c8f64b33646309062490954 (patch)
tree0379e3a0681d19fec754ccf5ab69aeaa3d613647 /lib
parentc27c9fac98784e77e732fa2ad98f78ae752249ba (diff)
downloadnextcloud-server-4bdc5834fa7d13c53c8f64b33646309062490954.tar.gz
nextcloud-server-4bdc5834fa7d13c53c8f64b33646309062490954.zip
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 <coding@schilljs.com>
Diffstat (limited to 'lib')
-rw-r--r--lib/private/Files/Cache/Cache.php2
1 files changed, 2 insertions, 0 deletions
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'];