[5.4] Remove unnecessary $this->setError('')
Summary of Changes
Turns out that somehow we have very old code that by default sets an (empty) error each time we save something or publish a nested entity. This triggers the new code for useException. This removes these unnecessary commands.
Testing Instructions
codereview...
Actual result BEFORE applying this Pull Request
Everything works.
Expected result AFTER applying this Pull Request
Everything works like before.
Link to documentations
Please select:
-
[ ] Documentation link for docs.joomla.org:
-
[X] No documentation changes for docs.joomla.org needed
-
[ ] Pull Request link for manual.joomla.org:
-
[X] No documentation changes for manual.joomla.org needed
I have tested this item :white_check_mark: successfully on 2b63c742f8deb4ab862c3c1271288438157315e5
This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/46527.
I have tested this item :white_check_mark: successfully on 2b63c742f8deb4ab862c3c1271288438157315e5
This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/46527.
RTC
This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/46527.
RTC
This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/46527.
Test result:
- ✅ Checked with
find . -name \*.php | xargs /usr/bin/grep "\$this->setError[(]''[)]"only the three removed entries are found in our code (and three more inlibraries/vendor/phpmailer/phpmailer/src/SMTP.php) - I tried to find actions by setting PR breakpoints at the three locations, but I couldn't stop at any of the three locations with xdebug. For example, I created and published articles. Therefore, I don't know what to test after applying the PR. In my opinion, system tests are sufficient in this case. Or do you have any tips?
Thanks @Hackwar for this fix, and thanks @alikon , @chmst and @muhme for testing.