Skip to content

Commit

Permalink
Make sure name and path are strings
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
nickvergessen committed Feb 2, 2023
1 parent d7cf396 commit b095999
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/private/Files/Cache/Cache.php
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,8 @@ public function get($file) {
*/
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'];
Expand Down

0 comments on commit b095999

Please sign in to comment.