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

CRM-21470 Ensure we don't have an empty locale #11333

Merged
merged 2 commits into from
Nov 28, 2017

Conversation

samuelsov
Copy link
Contributor

@samuelsov samuelsov commented Nov 27, 2017

Overview

Related to #11312 which has been committed.

In admin pages, Polylang as an option to display "Show all languages" instead of forcing one language. When we do so, it gives some PHP notice errors because CiviCRM is not able to find corresponding locale.

Before

Notice: Undefined index: in /var/aegir/platforms/wordpress/wp-content/plugins/civicrm/civicrm/CRM/Core/I18n/PseudoConstant.php on line 44

crm21470 - civicrm home wordpress

After

No notices.

Technical Details

Use !empty instead of isset


@eileenmcnaughton
Copy link
Contributor

I agree that it would not make sense to pursue the innids of that IF when $language is empty - so the change is a sensible e-notice fix

@seamuslee001
Copy link
Contributor

Jenkins re test this please

@eileenmcnaughton eileenmcnaughton merged commit 7a28c39 into civicrm:master Nov 28, 2017
sluc23 pushed a commit to ixiam/civicrm-core that referenced this pull request Jan 10, 2018
CRM-21470 Ensure we don't have an empty locale
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.

4 participants