Skip to content

Conversation

@wittman
Copy link
Contributor

@wittman wittman commented Oct 8, 2025

Description

Product details item groups read property on null fix.

$groups->getFirst() can return null which was not guarded against.

Sentry error caught access on null: $groups->getFirst()->item_group (line 1134).

If null there are zero groups.

Testing Instructions

Checkout PR in store working dir.

With pnpm start --symlinks=store...

Checkout coursehost master working dir.

https://berna.silverorange.com/course-host-ccme/work-USERNAME/www/admin/Product/Details?id=78 should return the UI without any exception errors.

Developer Checklist

Before requesting review for this PR, make sure the following tasks are
complete:

  • I added a link to the relevant Shortcut story, if applicable
  • I added testing instructions, if any
  • I made sure existing CI checks pass
  • I checked that all requirements of the ticket are fulfilled

Reviewer Checklist

Before merging this PR, make sure the following tasks are complete:

  • I made sure there are no active labels that block merge
  • I followed the testing instructions
  • I made sure the CI checks pass
  • I reviewed the file changes on GitHub
  • I checked that all requirements of the ticket (if any) are fulfilled

$groups->getFirst() can return null which was not guarded against.
If null there are zero groups.
@gauthierm gauthierm merged commit 699ba39 into silverorange:master Oct 10, 2025
0 of 2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants