Skip to content

fix: ignore empty or invalid timezone tag params - #199

Merged
edalzell merged 4 commits into
mainfrom
fix/empty-timezone-param
Sep 6, 2026
Merged

edalzell merged 4 commits into
mainfrom
fix/empty-timezone-param

Conversation

@edalzell

@edalzell edalzell commented Sep 6, 2026

Copy link
Copy Markdown
Member

Summary

  • Resolve empty/invalid timezone tag params instead of passing them to Carbon setTimezone().
  • Restore defaultTimezone() fallbacks: addon setting → Statamic display_timezone → app.timezone → UTC.
  • Calendar tag uses the same resolution path.

Test plan

  • php vendor/bin/pest --filter=timezone
  • Tag with timezone="" or an invalid value falls back without throwing
  • Valid timezone param still shifts occurrences

Empty timezone values from unresolved dictionary fields were passed straight into Carbon and crashed occurrence output.
@cursor

cursor Bot commented Sep 6, 2026

Copy link
Copy Markdown

Bugbot needs on-demand usage enabled

Bugbot uses usage-based billing for this team and requires on-demand usage to be enabled.

A team admin can enable on-demand usage in the Cursor dashboard.

@github-actions github-actions Bot added the fix label Sep 6, 2026
Collapse validation and fallback chain into resolveTimezone() so callers never handle null.
@cursor

cursor Bot commented Sep 6, 2026

Copy link
Copy Markdown

Bugbot needs on-demand usage enabled

Bugbot uses usage-based billing for this team and requires on-demand usage to be enabled.

A team admin can enable on-demand usage in the Cursor dashboard.

@edalzell
edalzell merged commit c86f785 into main Sep 6, 2026
25 checks passed
@edalzell
edalzell deleted the fix/empty-timezone-param branch September 6, 2026 20:33
@edalzell edalzell mentioned this pull request Sep 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant