-
Notifications
You must be signed in to change notification settings - Fork 9.4k
[\Magento\ConfigurableProduct\Model\Product\Type\Configurable] PHP error unoticed #39641
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Hi @bhennesAdv. Thank you for your report.
Join Magento Community Engineering Slack and ask your questions in #github channel. |
…t on subsequent calls on the same $product object
Hello, I made a PR for the change but I don't know on which branch do you want me to create the PR to ? For testing, the same, I did not invest time in creating automatic/manual testing for a variable name change in a deprecated function. Let me know if you need more. Regards, |
Hi @engcom-Hotel. Thank you for working on this issue.
|
Hello @bhennesAdv, Thanks for the report and creating a fix for the same! After going through the codebase mentioned in the main description, the issue seems reproducible for us: magento2/app/code/Magento/ConfigurableProduct/Model/Product/Type/Configurable.php Lines 551 to 561 in 11be3df
There is no need to reproduce this issue as it is confirming via looking into the codebase only. Hence confirming the issue. Thanks |
✅ Jira issue https://jira.corp.adobe.com/browse/AC-14159 is successfully created for this GitHub issue. |
✅ Confirmed by @engcom-Hotel. Thank you for verifying the issue. |
@magento I'm working on this |
Summary
Hello,
My phpstorm detected an error in a Preference I had to declare copying the entire \Magento\ConfigurableProduct\Model\Product\Type\Configurable.
The following function has an issue because $product variable is used by the loop as looping element erasing the given variable.
The function is deprecated but I still think it's a quick correction.
Examples
Not sure if an example is relevant as the only thing that would change is the time consumed by the calls when multiple calls are made on the same object
Proposed solution
Just change the variable name is the loop ?
Release note
Correction of cache usage on configurable product models when getUsedProductIds is used multiple times on the same model
Triage and priority
The text was updated successfully, but these errors were encountered: