? ? Pending

User tests: Successful: Unsuccessful:

avatar C-Lodder
C-Lodder
16 Feb 2018

Summary of Changes

This PR uses identical operators where possible for the plugins directory. Just a minor performance improvement.

Testing Instructions

Code review

avatar C-Lodder C-Lodder - open - 16 Feb 2018
avatar C-Lodder C-Lodder - change - 16 Feb 2018
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 16 Feb 2018
Category Front End Plugins
avatar C-Lodder C-Lodder - change - 16 Feb 2018
The description was changed
avatar C-Lodder C-Lodder - edited - 16 Feb 2018
avatar C-Lodder C-Lodder - change - 16 Feb 2018
The description was changed
avatar C-Lodder C-Lodder - edited - 16 Feb 2018
avatar Quy
Quy - comment - 28 Feb 2018

I have tested this item successfully on 827839f


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

avatar Quy Quy - test_item - 28 Feb 2018 - Tested successfully
avatar Anu1601CS Anu1601CS - test_item - 1 Mar 2018 - Tested successfully
avatar Anu1601CS
Anu1601CS - comment - 1 Mar 2018

I have tested this item successfully on 827839f


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

avatar franz-wohlkoenig franz-wohlkoenig - change - 1 Mar 2018
Status Pending Ready to Commit
avatar franz-wohlkoenig
franz-wohlkoenig - comment - 1 Mar 2018

Ready to Commit after two successful tests.

avatar laoneo laoneo - change - 19 Apr 2018
Labels Added: ? ?
avatar brianteeman
brianteeman - comment - 22 Jul 2018

@C-Lodder can you please respond to the question from @laoneo and then we can move forward with this.

avatar laoneo
laoneo - comment - 17 Aug 2018

Honestly I would revert all the === '' checks as they need to be checked on a case by case basis, because it can have unwanted side effects.

avatar ggppdk
ggppdk - comment - 18 Aug 2018

About strict comparison in template files (of custom fields)

Are you sure we do not break here something as 0 and false are allowed now? Same for the others where you do === ''.

Actually this change will allow an integer value of 0 (zero)
because current comparison is unable to display zero (i mean the integer type of zero)

but then you would ask, why currently display of zero is possible ? (i mean currently it works)

It is because currently fields like

  • text, textarea, integer fields
    use default handling for values (they do not implement some custom handling before passing to the value to the template),
    which passes to the template file (/tmpl/*.php) a string value

That is this is passed

  • string(1) "0"

thus this if (string(1) "0" == '') evaluates to false, thus display of zero is possible

The strict comparison will effect the case of passing a value NULL or FALSE
since it will allow them to be "displayed"
but then current template code for such value will show nothing anyway
aka the current display of fields will not change

avatar C-Lodder
C-Lodder - comment - 9 Oct 2018

@laoneo @brianteeman all the == '' have been reverted as request. Please squash the commits

avatar laoneo laoneo - change - 15 Oct 2018
Status Ready to Commit Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2018-10-15 12:06:46
Closed_By laoneo
avatar laoneo laoneo - close - 15 Oct 2018
avatar laoneo laoneo - merge - 15 Oct 2018
avatar laoneo
laoneo - comment - 15 Oct 2018

Thanks

Add a Comment

Login with GitHub to post a comment