Skip to content

WIP Fix fatal error in dashboard widgets when user has no editable sites - #4350

Draft
lukeholder wants to merge 1 commit into
5.xfrom
bugfix/5.x-widget-no-editable-site
Draft

WIP Fix fatal error in dashboard widgets when user has no editable sites#4350
lukeholder wants to merge 1 commit into
5.xfrom
bugfix/5.x-widget-no-editable-site

Conversation

@lukeholder

Copy link
Copy Markdown
Member

Cp::requestedSite() returns null when the current user has no editable sites, causing a fatal error on ->getStore() in every Commerce widget's init(). Fall back to the primary store in that case, matching the pattern used elsewhere in the codebase.

Fixes #4347

Description

Related issues

Cp::requestedSite() returns null when the current user has no editable
sites, causing a fatal error on ->getStore() in every Commerce widget's
init(). Fall back to the primary store in that case, matching the
pattern used elsewhere in the codebase.

Fixes #4347
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.

[5.x]: Call to a member function getStore() on null

1 participant