Skip to content

fix(appmanager): ignore null appinfo - #54056

Closed
ArtificialOwl wants to merge 1 commit into
masterfrom
fix/noid/ignore-null-appinfo
Closed

fix(appmanager): ignore null appinfo#54056
ArtificialOwl wants to merge 1 commit into
masterfrom
fix/noid/ignore-null-appinfo

Conversation

@ArtificialOwl

@ArtificialOwlArtificialOwl commented Jul 23, 2025

Copy link
Copy Markdown
Member

fix regression from #52777

since the key core in $this->appinfos[] generated in getAppInfo() is NULL, we have this in the logs:

{
"level": 2,
"method": "GET",
"url": "/index.php/settings/admin/security",
"message": "foreach() argument must be of type array|object, null given at /home/maxence/sites/nc32/nextcloud/lib/private/App/AppManager.php#926",
"version": "32.0.0.1",
"data": {
"app": "PHP"
}
}

@ArtificialOwl
ArtificialOwl requested a review from a team as a code ownerJuly 23, 2025 11:08
@ArtificialOwl
ArtificialOwl requested review from Altahrim, artonge, leftybournes and susnux and removed request for a teamJuly 23, 2025 11:08
@ArtificialOwlArtificialOwl added the 3. to review Waiting for reviews label Jul 23, 2025
@ArtificialOwlArtificialOwl added this to the Nextcloud 32 milestone Jul 23, 2025
Signed-off-by: Maxence Lange <maxence@artificial-owl.com>
@ArtificialOwl
ArtificialOwlforce-pushed the fix/noid/ignore-null-appinfo branch from 050661e to 6d2dfcbCompareJuly 23, 2025 11:11
@susnuxsusnux added the bug label Jul 23, 2025
@susnux

Copy link
Copy Markdown
Contributor

Where is it set to null? I do not really get where core comes into play

@ArtificialOwl

Copy link
Copy Markdown
MemberAuthor

Where is it set to null? I do not really get where core comes into play

  1. the list of apps sent to registerApps() now includes 'core': 7fe272f

  2. during the process of buildAppNamespace, we get details from the app using IAppManager::getAppInfo():

    $appInfo = \OCP\Server::get(IAppManager::class)->getAppInfo($appId);

  3. getAppInfoByPath() store a null value for the array key 'code' of $this->appInfos because we have no file core/appinfo/info.xml:

    $data = $this->getAppInfoByPath($file, $lang);
    if ($lang === null) {
    $this->appInfos[$appId] = $data;
    }
    return$data;

This was referenced Aug 22, 2025
@nextcloud-botnextcloud-bot mentioned this pull request Sep 2, 2025
@ArtificialOwl

Copy link
Copy Markdown
MemberAuthor

fixed by #54541

@susnux
susnux deleted the fix/noid/ignore-null-appinfo branch November 1, 2025 11:29
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3. to reviewWaiting for reviewsbug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@ArtificialOwl@susnux@skjnldsv