Skip to content

Commit

Permalink
Update AbstractForm.php
Browse files Browse the repository at this point in the history
Added override of \Magento\Backend\Block\Widget\Form method getForm to resolve Error: "RemovePasswordAndUserConfirmationFormFieldsPlugin::afterGetForm(): Argument m2epro#2 ($result) must be of type Magento\Framework\Data\Form, null" in magento 2.4.5, as addressed in magento/magento2#36145
  • Loading branch information
matteorossi-thespacesm authored Mar 24, 2023
1 parent 74fdd6b commit 44ac243
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion Block/Adminhtml/Magento/Form/AbstractForm.php
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,16 @@ public function __construct(

parent::__construct($context, $registry, $formFactory, $data);
}


public function getForm()
{
if ($this->_form == null) {
return $this->_formFactory->create();
} else {
return $this->_form;
}
}

protected function _prepareLayout()
{
parent::_prepareLayout();
Expand Down

0 comments on commit 44ac243

Please sign in to comment.