-
Notifications
You must be signed in to change notification settings - Fork 9.4k
Closed
Labels
Component: EavFixed in 2.2.xThe issue has been fixed in 2.2 release lineThe issue has been fixed in 2.2 release lineFixed in 2.3.xThe issue has been fixed in 2.3 release lineThe issue has been fixed in 2.3 release lineIssue: Clear DescriptionGate 2 Passed. Manual verification of the issue description passedGate 2 Passed. Manual verification of the issue description passedIssue: ConfirmedGate 3 Passed. Manual verification of the issue completed. Issue is confirmedGate 3 Passed. Manual verification of the issue completed. Issue is confirmedIssue: Format is validGate 1 Passed. Automatic verification of issue format passedGate 1 Passed. Automatic verification of issue format passedIssue: Ready for WorkGate 4. Acknowledged. Issue is added to backlog and ready for developmentGate 4. Acknowledged. Issue is added to backlog and ready for developmentReproduced on 2.2.xThe issue has been reproduced on latest 2.2 releaseThe issue has been reproduced on latest 2.2 releaseReproduced on 2.3.xThe issue has been reproduced on latest 2.3 releaseThe issue has been reproduced on latest 2.3 release
Description
Preconditions
- Latest Magento 2.3
I spot the problem in M2 Commerce in RMA module, but as problem comes from M2 Open Source core and is clearly visible by code review, I'm adding it here.
Steps to reproduce
- Enable RMA feature in backend
- Place order in frontend
- Invoice and ship order in backend
- Navigate to order details in My Account pages in frontend
- Open order details
- Click "Return"
Expected result
RMA form is displayed
Actual result
Exception is thrown:
1 exception(s):
Exception #0 (Exception): Warning: Invalid argument supplied for foreach() in vendor/magento/module-rma/Block/Returns/Create.php on line 155
The problem looks as introduced in \Magento\Eav\Model\Form::getAttributes
where not all class variables are initialized as array, but they are returned by method which suppose to return array:
public function getSystemAttributes()
{
if ($this->_systemAttributes === null) {
// load attributes
$this->getAttributes();
}
return $this->_systemAttributes;
}
getAttributes
method initializes _attributes
and _userAttributes
variables as arrays but not _systemAttributes
and _allowedAttributes
.
I will submit PR for this soon.
Metadata
Metadata
Assignees
Labels
Component: EavFixed in 2.2.xThe issue has been fixed in 2.2 release lineThe issue has been fixed in 2.2 release lineFixed in 2.3.xThe issue has been fixed in 2.3 release lineThe issue has been fixed in 2.3 release lineIssue: Clear DescriptionGate 2 Passed. Manual verification of the issue description passedGate 2 Passed. Manual verification of the issue description passedIssue: ConfirmedGate 3 Passed. Manual verification of the issue completed. Issue is confirmedGate 3 Passed. Manual verification of the issue completed. Issue is confirmedIssue: Format is validGate 1 Passed. Automatic verification of issue format passedGate 1 Passed. Automatic verification of issue format passedIssue: Ready for WorkGate 4. Acknowledged. Issue is added to backlog and ready for developmentGate 4. Acknowledged. Issue is added to backlog and ready for developmentReproduced on 2.2.xThe issue has been reproduced on latest 2.2 releaseThe issue has been reproduced on latest 2.2 releaseReproduced on 2.3.xThe issue has been reproduced on latest 2.3 releaseThe issue has been reproduced on latest 2.3 release