Skip to content

Cache::getId should return as int (not string) #16684

@patricksebastien

Description

@patricksebastien

Steps to reproduce

  1. Using the groupfolder permission occ command:
    occ groupfolders:permissions 4 --user User / -- +write

Expected behaviour

Setting the permission for the folder without error.

Actual behaviour

TypeError: Argument 2 passed to OCA\GroupFolders\ACL\Rule::__construct() must be of the type integer, string given, called in /var/www/html/nextcloud/apps/groupfolders/lib/Command/ACL.php on line 185 and defined in /var/www/html/nextcloud/apps/groupfolders/lib/ACL/Rule.php:48

Solution

Forcing intval() on Cache::getId
https://github.com/nextcloud/server/blob/master/lib/private/Files/Cache/Cache.php#L419

Groupfolder issue:

nextcloud/groupfolders#470

Server configuration

Operating system:
Ubuntu

Web server:
Nginx

Database:
Mysql

PHP version:
7.2

Nextcloud version:
16.0.4

Metadata

Metadata

Assignees

No one assigned

    Labels

    0. Needs triagePending check for reproducibility or if it fits our roadmapbug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions