Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Globals.GetCultureCode will not work when call from scheduler #2606

Closed
1 task done
zyhfish opened this issue Mar 4, 2019 · 1 comment
Closed
1 task done

Globals.GetCultureCode will not work when call from scheduler #2606

zyhfish opened this issue Mar 4, 2019 · 1 comment

Comments

@zyhfish
Copy link
Contributor

zyhfish commented Mar 4, 2019

Description of bug

when Globals.GetCultureCode called from scheduler, it will throw out null reference exception, this caused by commit #9ab22767, PortalController.Instance.GetCurrentPortalSettings() doesn't exist in sub thread. i think the code need change to:
var portalSettings = PortalController.Instance.GetCurrentPortalSettings(); cultureCode = portalSettings?.DefaultLanguage ?? Thread.CurrentThread.CurrentCulture.Name;

Affected version

  • 9.3.0
@valadas
Copy link
Contributor

valadas commented Jul 29, 2019

Closing since PR got merged

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

No branches or pull requests

2 participants