-
Notifications
You must be signed in to change notification settings - Fork 9.4k
Closed
Labels
Area: SEOComponent: CatalogIssue: ConfirmedGate 3 Passed. Manual verification of the issue completed. Issue is confirmedGate 3 Passed. Manual verification of the issue completed. Issue is confirmedPriority: P2A defect with this priority could have functionality issues which are not to expectations.A defect with this priority could have functionality issues which are not to expectations.Progress: PR CreatedIndicates that Pull Request has been created to fix issueIndicates that Pull Request has been created to fix issueProgress: doneReported on 2.4.8-p1Indicates original Magento version for the Issue report.Indicates original Magento version for the Issue report.Reproduced on 2.4.xThe issue has been reproduced on latest 2.4-develop branchThe issue has been reproduced on latest 2.4-develop branch
Description
Preconditions and environment
Tested on Magento 2.4.8-p1.
getById()
function in Magento\Catalog\Model\ProductRepository
produces an "Undefined array key" if the $productId
argument is a string that starts with a valid product ID but contains other trailing characters. For example if you have a product with ID 123
and the function is called with $productId
value of "123abc"
.
Steps to reproduce
- Have the ID of a product (123 in this example).
- Navigate to the product page but append characters to the ID like
/catalog/product/view/id/123abc
Expected result
A 404 not found page.
Actual result
An exception is thrown.
Additional information
No response
Release note
No response
Triage and priority
- Severity: S0 - Affects critical data or functionality and leaves users without 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
Area: SEOComponent: CatalogIssue: ConfirmedGate 3 Passed. Manual verification of the issue completed. Issue is confirmedGate 3 Passed. Manual verification of the issue completed. Issue is confirmedPriority: P2A defect with this priority could have functionality issues which are not to expectations.A defect with this priority could have functionality issues which are not to expectations.Progress: PR CreatedIndicates that Pull Request has been created to fix issueIndicates that Pull Request has been created to fix issueProgress: doneReported on 2.4.8-p1Indicates original Magento version for the Issue report.Indicates original Magento version for the Issue report.Reproduced on 2.4.xThe issue has been reproduced on latest 2.4-develop branchThe issue has been reproduced on latest 2.4-develop branch