PR-5.3-dev Pending

User tests: Successful: Unsuccessful:

avatar joomdonation
joomdonation
28 Feb 2025

Pull Request for Issue # .

Summary of Changes

The loadForm method from FormBehaviorTrait (which is used by our models) always return a Form object on success and throw Exception on failure, so all empty($form) check in our model classes are useless, it never returns false, thus should be moved from models code.

Testing Instructions

This will require careful code review from our testers and maintainer.

Actual result BEFORE applying this Pull Request

Works

Expected result AFTER applying this Pull Request

Works, slight faster because the useless code is removed, thus not being executed.

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 joomdonation joomdonation - open - 28 Feb 2025
avatar joomdonation joomdonation - change - 28 Feb 2025
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 28 Feb 2025
Category Administration com_associations com_banners com_categories com_config com_contact com_content com_fields com_finder com_installer com_languages com_media com_menus com_messages com_modules com_newsfeeds com_plugins com_redirect
avatar joomdonation joomdonation - change - 28 Feb 2025
Title
Remove useless empty ($form) check
[5.3] Remove useless empty ($form) check
avatar joomdonation joomdonation - edited - 28 Feb 2025
avatar joomdonation joomdonation - change - 1 Mar 2025
Labels Added: PR-5.3-dev

Add a Comment

Login with GitHub to post a comment