Skip to content

Tiny JLanguage::loadLanguage() code improvement#14653

Closed
Hackwar wants to merge 2 commits intojoomla:stagingfrom
Hackwar:patch-16
Closed

Tiny JLanguage::loadLanguage() code improvement#14653
Hackwar wants to merge 2 commits intojoomla:stagingfrom
Hackwar:patch-16

Conversation

@Hackwar
Copy link
Copy Markdown
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
Copy Markdown

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
Copy Markdown
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
Copy Markdown
Contributor

Quy commented Nov 9, 2017

Please fix conflicts. Thanks.

@joomla-cms-bot
Copy link
Copy Markdown

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

@Quy
Copy link
Copy Markdown
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