Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

fix(Teams): Use string team IDs on teams iteration#57146

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Draft
solracsf wants to merge1 commit intomaster
base:master
Choose a base branch
Loading
fromuseTeamIds

Conversation

@solracsf
Copy link
Member

Summary

TeamManager::getSharedWithList() receives an array of team ID strings fromTeamsApiController, but its fallback code path tries to callgetId() on those strings as if they wereTeam objects.

$sharesPerTeams =$this->teamManager->getSharedWithList(array_map(fn (Team$team):string =>$team->getId(),$teams),$this->userId);

This PR changes the fallback to treat$teams as an array of IDs and matches the actual input contract from the controller to avoid the type error.

Type error stack
{  "reqId": "kfnWhMgNo3FHFARdoSjn",  "level": 3,  "time": "2025-12-16T08:27:25+01:00",  "remoteAddr": "19.133.41.27",  "user": "WBE4",  "app": "no app in context",  "method": "GET",  "url": "/ocs/v2.php/teams/resources/deck/85",  "message": "Call to a member function getId() on string in file '/var/www/nextcloud/lib/private/Teams/TeamManager.php' line 97",  "userAgent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/137.0.0.0 Safari/537.36",  "version": "31.0.12.3",  "exception": {    "Exception": "Exception",    "Message": "Call to a member function getId() on string in file '/var/www/nextcloud/lib/private/Teams/TeamManager.php' line 97",    "Code": 0,    "Trace": [      {        "file": "/var/www/nextcloud/lib/private/AppFramework/App.php",        "line": 161,        "function": "dispatch",        "class": "OC\\AppFramework\\Http\\Dispatcher",        "type": "->",        "args": [          {            "__class__": "OC\\Core\\Controller\\TeamsApiController"          },          "listTeams"        ]      },      {        "file": "/var/www/nextcloud/lib/private/Route/Router.php",        "line": 315,        "function": "main",        "class": "OC\\AppFramework\\App",        "type": "::",        "args": [          "OC\\Core\\Controller\\TeamsApiController",          "listTeams",          {            "__class__": "OC\\AppFramework\\DependencyInjection\\DIContainer"          },          {            "providerId": "deck",            "resourceId": "85",            "_route": "ocs.core.teamsapi.listteams"          }        ]      },      {        "file": "/var/www/nextcloud/ocs/v1.php",        "line": 49,        "function": "match",        "class": "OC\\Route\\Router",        "type": "->",        "args": [          "/ocsapp/teams/resources/deck/85"        ]      },      {        "file": "/var/www/nextcloud/ocs/v2.php",        "line": 7,        "args": [          "/var/www/nextcloud/ocs/v1.php"        ],        "function": "require_once"      }    ],    "File": "/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php",    "Line": 146,    "Previous": {      "Exception": "Error",      "Message": "Call to a member function getId() on string",      "Code": 0,      "Trace": [        {          "file": "/var/www/nextcloud/core/Controller/TeamsApiController.php",          "line": 68,          "function": "getSharedWithList",          "class": "OC\\Teams\\TeamManager",          "type": "->",          "args": [            [              "y7C8gdZWHIAnLHcab7wcycX5mUIAC7J"            ],            "WBE4"          ]        },        {          "file": "/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php",          "line": 200,          "function": "listTeams",          "class": "OC\\Core\\Controller\\TeamsApiController",          "type": "->",          "args": [            "deck",            "85"          ]        },        {          "file": "/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php",          "line": 114,          "function": "executeController",          "class": "OC\\AppFramework\\Http\\Dispatcher",          "type": "->",          "args": [            {              "__class__": "OC\\Core\\Controller\\TeamsApiController"            },            "listTeams"          ]        },        {          "file": "/var/www/nextcloud/lib/private/AppFramework/App.php",          "line": 161,          "function": "dispatch",          "class": "OC\\AppFramework\\Http\\Dispatcher",          "type": "->",          "args": [            {              "__class__": "OC\\Core\\Controller\\TeamsApiController"            },            "listTeams"          ]        },        {          "file": "/var/www/nextcloud/lib/private/Route/Router.php",          "line": 315,          "function": "main",          "class": "OC\\AppFramework\\App",          "type": "::",          "args": [            "OC\\Core\\Controller\\TeamsApiController",            "listTeams",            {              "__class__": "OC\\AppFramework\\DependencyInjection\\DIContainer"            },            {              "providerId": "deck",              "resourceId": "85",              "_route": "ocs.core.teamsapi.listteams"            }          ]        },        {          "file": "/var/www/nextcloud/ocs/v1.php",          "line": 49,          "function": "match",          "class": "OC\\Route\\Router",          "type": "->",          "args": [            "/ocsapp/teams/resources/deck/85"          ]        },        {          "file": "/var/www/nextcloud/ocs/v2.php",          "line": 7,          "args": [            "/var/www/nextcloud/ocs/v1.php"          ],          "function": "require_once"        }      ],      "File": "/var/www/nextcloud/lib/private/Teams/TeamManager.php",      "Line": 97    },    "message": "Call to a member function getId() on string in file '/var/www/nextcloud/lib/private/Teams/TeamManager.php' line 97",    "exception": [],    "CustomMessage": "Call to a member function getId() on string in file '/var/www/nextcloud/lib/private/Teams/TeamManager.php' line 97"  },  "id": "6942ae4e5ace5"}

Checklist

@solracsfsolracsf added this to theNextcloud 33 milestoneDec 17, 2025
@solracsfsolracsf requested a review froma team as acode ownerDecember 17, 2025 14:18
@solracsfsolracsf added bug 3. to reviewWaiting for reviews labelsDec 17, 2025
@solracsfsolracsf requested review fromAltahrim,ArtificialOwl,CarlSchwan,icewind1991 andsalmart-dev and removed request fora teamDecember 17, 2025 14:18
@solracsfsolracsf marked this pull request as draftDecember 17, 2025 14:23
@solracsfsolracsf changed the titlefix(Teams): Use team IDs on teams iterationfix(Teams): Use string team IDs on teams iterationDec 17, 2025
Signed-off-by: Git'Fellow <12234510+solracsf@users.noreply.github.com>
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@icewind1991icewind1991Awaiting requested review from icewind1991icewind1991 is a code owner automatically assigned from nextcloud/server-backend

@AltahrimAltahrimAwaiting requested review from AltahrimAltahrim is a code owner automatically assigned from nextcloud/server-backend

@salmart-devsalmart-devAwaiting requested review from salmart-devsalmart-dev is a code owner automatically assigned from nextcloud/server-backend

@CarlSchwanCarlSchwanAwaiting requested review from CarlSchwanCarlSchwan is a code owner automatically assigned from nextcloud/server-backend

@ArtificialOwlArtificialOwlAwaiting requested review from ArtificialOwl

At least 2 approving reviews are required to merge this pull request.

Assignees

No one assigned

Labels

3. to reviewWaiting for reviewsbug

Projects

None yet

Milestone

Nextcloud 33

Development

Successfully merging this pull request may close these issues.

1 participant

@solracsf

[8]ページ先頭

©2009-2025 Movatter.jp