User tests: Successful: Unsuccessful:
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.
Codereview
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
Category | ⇒ | Libraries |
Status | New | ⇒ | Pending |
Labels |
Added:
PR-4.3-dev
|
I have not tested this item.
Tested the filter in an article field link A.
Same result before and after patch.
I have tested this item
Tested the filter in an article field link A.
Same result before and after patch.
I have tested this item
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)
Status | Pending | ⇒ | Ready to Commit |
Labels |
Added:
?
|
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 |
Why make the code easy, when you can also make it difficult... I changed the ! to the ===...