Skip to content

Conversation

ArtificialOwl
Copy link
Member

@ArtificialOwl ArtificialOwl commented Jul 23, 2025

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 owner July 23, 2025 11:08
@ArtificialOwl ArtificialOwl requested review from Altahrim, artonge, leftybournes and susnux and removed request for a team July 23, 2025 11:08
@ArtificialOwl ArtificialOwl added the 3. to review Waiting for reviews label Jul 23, 2025
@ArtificialOwl ArtificialOwl added this to the Nextcloud 32 milestone Jul 23, 2025
Signed-off-by: Maxence Lange <maxence@artificial-owl.com>
@ArtificialOwl ArtificialOwl force-pushed the fix/noid/ignore-null-appinfo branch from 050661e to 6d2dfcb Compare July 23, 2025 11:11
@susnux susnux added the bug label Jul 23, 2025
@susnux
Copy link
Contributor

susnux commented Jul 23, 2025

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

@ArtificialOwl
Copy link
Member Author

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-bot nextcloud-bot mentioned this pull request Sep 2, 2025
@ArtificialOwl
Copy link
Member Author

fixed by #54541

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3. to review Waiting for reviews bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants