Skip to content

fix: Null-safe EPG access when editing channel#888

Closed
Warbs816 wants to merge 1 commit intom3ue:devfrom
Warbs816:fix/887-edit-channel-epg-null
Closed

fix: Null-safe EPG access when editing channel#888
Warbs816 wants to merge 1 commit intom3ue:devfrom
Warbs816:fix/887-edit-channel-epg-null

Conversation

@Warbs816
Copy link
Copy Markdown
Contributor

Summary

  • Fixes Unable to edit a channel (v0.10.27-dev) #887 — editing a channel crashes with "Attempt to read property 'name' on null" when the EPG channel's parent EPG record is missing
  • Adds null-safe operator (?->) to getOptionLabelFromRecordUsing callback in ChannelResource.php:1310, consistent with the existing guard on line 1328

Test plan

  • Edit a channel whose EPG channel has a deleted/missing parent EPG — should no longer error
  • Edit a channel with a valid EPG channel — label should still display correctly

@Warbs816 Warbs816 marked this pull request as ready for review March 28, 2026 11:02
sparkison added a commit that referenced this pull request Mar 28, 2026
@sparkison
Copy link
Copy Markdown
Member

This works, but the underlying problem is that the EPG relation wasn't being loaded, so the name was always empty. I've got a fix in place, closing this down 😉

@sparkison sparkison closed this Mar 28, 2026
@Warbs816 Warbs816 deleted the fix/887-edit-channel-epg-null branch March 28, 2026 18:09
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