User tests: Successful: Unsuccessful:
This PR uses identical operators where possible for the plugins
directory. Just a minor performance improvement.
Code review
Status | New | ⇒ | Pending |
Category | ⇒ | Front End Plugins |
I have tested this item
Status | Pending | ⇒ | Ready to Commit |
Ready to Commit after two successful tests.
Labels |
Added:
?
?
|
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.
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
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
@laoneo @brianteeman all the == ''
have been reverted as request. Please squash the commits
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 |
Thanks
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.