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

Fix ContextImpl cannot be cast to WordPress #8310

Merged
merged 1 commit into from
Sep 14, 2018

Conversation

malinajirka
Copy link
Contributor

@malinajirka malinajirka commented Sep 14, 2018

Fixes #8309

We cast WordPress.getContext() to WordPress, however when the user changes a locale within the app, the WordPress.getContext() doesn't contain WordPress but ContextImpl.

To test:

  1. Change a locale in the app settings
  2. Go to My Site
  3. Click on the Media Library
  4. Notice the app doesn't crash

  1. Change a locale in the app settings
  2. Create a new Post
  3. Upload a new Image
  4. Notice the app doesn't crash

@wpmobilebot
Copy link
Contributor

1 Warning
⚠️ PR is not assigned to a milestone.

Generated by 🚫 Danger

Copy link
Contributor

@oguzkocer oguzkocer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Replicated the crash in develop and verified that it's fixed with these changes.

:shipit:

@oguzkocer oguzkocer merged commit c67e6ab into release/10.9 Sep 14, 2018
@oguzkocer oguzkocer deleted the issue/8309-fix-change-locale-context branch September 14, 2018 18:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants