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

Tiny JLanguage::loadLanguage() code improvement #14653

Closed
wants to merge 2 commits into from

Conversation

Hackwar
Copy link
Member

@Hackwar Hackwar commented Mar 15, 2017

This simplifies the code slightly. The additional if() is unnecessary. The $strings variable is always defined and the if() does contain nothing else than yet another if(). This change is not really testable and requires a code review.

@ghost
Copy link

ghost commented Mar 15, 2017

I have tested this item ✅ successfully on ee0b0a0


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/14653.

@Bakual
Copy link
Contributor

Bakual commented Mar 15, 2017

The $strings variable is always defined

That's true, but it isn't what is tested there. That check tests if $strings is boolean true, not if it is defined.

The code change itself should be fine, since is_array() will as well return false if $strings is still set to false (a few lines above).

This change is not really testable and requires a code review.

When I look at the code, that change should be testable by deleting/renaming a language file that is supposed to be loaded. If everything works and no errors logged then it is fine.

@Quy
Copy link
Contributor

Quy commented Nov 9, 2017

Please fix conflicts. Thanks.

@joomla-cms-bot
Copy link

Set to "closed" on behalf of @Quy by The JTracker Application at issues.joomla.org/joomla-cms/14653

@Quy
Copy link
Contributor

Quy commented Apr 29, 2018

See PR #20257


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/14653.

@Hackwar Hackwar deleted the patch-16 branch May 18, 2019 20:42
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 participants