? PR-4.3-dev Pending

User tests: Successful: Unsuccessful:

avatar Hackwar
Hackwar
29 Mar 2023

Summary of Changes

phpstan reported an issue. The comparison in the changed line is currently broken. The way the operators are used, the type attribute is first cast from a SimpleXMLElement to a string, then negated as a boolean and then compared against a string. Thus the comparison is always wrong. With the added parentheses, the comparison is actually working again.

Testing Instructions

Codereview

Link to documentations

Please select:

  • Documentation link for docs.joomla.org:

  • No documentation changes for docs.joomla.org needed

  • Pull Request link for manual.joomla.org:

  • No documentation changes for manual.joomla.org needed

avatar joomla-cms-bot joomla-cms-bot - change - 29 Mar 2023
Category Libraries
avatar Hackwar Hackwar - open - 29 Mar 2023
avatar Hackwar Hackwar - change - 29 Mar 2023
Status New Pending
avatar Hackwar Hackwar - change - 29 Mar 2023
Labels Added: PR-4.3-dev
avatar Hackwar
Hackwar - comment - 29 Mar 2023

Why make the code easy, when you can also make it difficult... I changed the ! to the ===...

avatar chmst chmst - test_item - 29 Mar 2023 - Not tested
avatar chmst chmst - test_item - 29 Mar 2023 - Tested successfully
avatar chmst
chmst - comment - 29 Mar 2023

I have not tested this item.

Tested the filter in an article field link A.
Same result before and after patch.


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

avatar chmst
chmst - comment - 29 Mar 2023

I have tested this item successfully on d972072

Tested the filter in an article field link A.
Same result before and after patch.


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

avatar joomdonation joomdonation - test_item - 29 Mar 2023 - Tested successfully
avatar joomdonation
joomdonation - comment - 29 Mar 2023

I have tested this item successfully on d972072

The code is clearly wrong. I also did a real test by changing link A to a text field, enter a not valid URL google.com, and has it converted automatically to http://google.com (It should be https these days, but it is a different issue)


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

avatar joomdonation joomdonation - change - 29 Mar 2023
Status Pending Ready to Commit
avatar obuisard obuisard - change - 29 Mar 2023
Labels Added: ?
avatar obuisard obuisard - change - 29 Mar 2023
Status Ready to Commit Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2023-03-29 22:58:14
Closed_By obuisard
avatar obuisard obuisard - close - 29 Mar 2023
avatar obuisard obuisard - merge - 29 Mar 2023
avatar obuisard
obuisard - comment - 29 Mar 2023

Thank you Hannes @Hackwar

Add a Comment

Login with GitHub to post a comment