Open
Description
Summary (*)
There is an issue with types in \Magento\GroupedProduct\Model\Product\Type\Grouped
class, in method _prepareProduct
. A variable can be set as false, and is then used in a foreach
.
.CRITICAL: Exception: Warning: foreach() argument must be of type array|object, bool given in /var/www/html/vendor/magento/module-grouped-product/Model/Product/Type/Grouped.php on line 391
Examples (*)
$associatedProducts = !$isStrictProcessMode || !empty($productsInfo)
? $this->getAssociatedProducts($product)
: false;
foreach ($associatedProducts as $subProduct) {
Proposed solution
$associatedProducts = !$isStrictProcessMode || !empty($productsInfo)
? $this->getAssociatedProducts($product)
: [];
foreach ($associatedProducts as $subProduct) {
Please provide Severity assessment for the Issue as Reporter. This information will help during Confirmation and Issue triage processes.
- Severity: S0 - Affects critical data or functionality and leaves users with no workaround.
- Severity: S1 - Affects critical data or functionality and forces users to employ a workaround.
- Severity: S2 - Affects non-critical data or functionality and forces users to employ a workaround.
- Severity: S3 - Affects non-critical data or functionality and does not force users to employ a workaround.
- Severity: S4 - Affects aesthetics, professional look and feel, “quality” or “usability”.
Metadata
Metadata
Assignees
Labels
Gate 3 Passed. Manual verification of the issue completed. Issue is confirmedA defect with this priority could have functionality issues which are not to expectations.The issue has been reproduced on latest 2.4-develop branchIssue related to Developer Experience and needs help with Triage to Confirm or Reject it
Type
Projects
Status
Pull Request In Progress