Locales: avoid Fatal Errors when GlotPress is active.#4081
Merged
Conversation
Member
Author
|
cc @akirk |
Contributor
|
Seeing how |
Member
|
I agree to check if the class is defined, though I think it is safe to assume that if |
locales.php
Outdated
| @@ -1,4 +1,7 @@ | |||
| <?php | |||
|
|
|||
| if ( ! class_exists( 'GP_Locale' ) ) : | |||
Member
There was a problem hiding this comment.
Should be enough to only have:
if ( class_exists( 'GP_Locale' ) ) {
return;
}
If GP_Locale is defined, GP_Locales is probably defined too. @see #4081 (comment)
Member
Author
|
@akirk That makes sense. I've edited my Pr accordingly. |
Member
|
LGTM! |
kraftbj
pushed a commit
that referenced
this pull request
Jun 9, 2016
* Locales: avoid Fatal Errors when GlotPress is active. Reported here: https://wordpress.org/support/topic/fatal-error-with-glotpress-activated * Locales: only check for GP_Locale before to load the 2 classes. If GP_Locale is defined, GP_Locales is probably defined too. @see #4081 (comment)
Contributor
|
Cherry-picked via 5f80858 to |
jeherve
added a commit
that referenced
this pull request
Jun 13, 2016
jeherve
added a commit
that referenced
this pull request
Jun 14, 2016
Contributor
|
This is being reverted by #6965 as wpcom has resolved the issue differently: r135921-wpcom |
georgestephanis
added a commit
that referenced
this pull request
Apr 12, 2017
Reverts #4081 Conflicts: locales.php
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Reported here:
https://wordpress.org/support/topic/fatal-error-with-glotpress-activated