Skip to content

Conversation

@maltehuebner
Copy link
Contributor

Summary

  • Use nullsafe operator (?->) in Data::getProvider() to prevent TypeError

Problem

Data::station is typed as ?Station (nullable), but getProvider() called $this->station->getProvider() directly. This crashes when station is null, e.g. for adhoc Data objects created by AdhocDataRetriever.

Test plan

  • Verify pages rendering Data objects without stations don't crash
  • Verify station detail pages still show the provider

🤖 Generated with Claude Code

The station property is nullable, but getProvider() called
\$this->station->getProvider() without a null check. This could cause
a TypeError for adhoc Data objects created without a persisted station.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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.

1 participant