-
Notifications
You must be signed in to change notification settings - Fork 9.4k
[Forwardport] Add missing false-check to the ConfiguredRegularPrice price-model #16658
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
[Forwardport] Add missing false-check to the ConfiguredRegularPrice price-model #16658
Conversation
Hi @mageprince. Thank you for your contribution
For more details, please, review the Magento Contributor Assistant documentation |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mageprince during forwardport original PR author must be preserved in commits.
@@ -13,12 +13,12 @@ | |||
use Magento\Framework\Pricing\PriceCurrencyInterface; | |||
|
|||
/** | |||
* Configured regular price model. | |||
* Configured regular price model |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Restore all dots and don't touch them in the future.
@@ -57,23 +57,22 @@ public function __construct( | |||
* @param ItemInterface $item | |||
* @return $this | |||
*/ | |||
public function setItem(ItemInterface $item) : ConfiguredRegularPrice | |||
public function setItem(ItemInterface $item) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do not remove existing type hints, feel free to add new ones.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for your review. I revert it back.
Hi, @orlangur I have updated the files. Please check the PR. |
@mageprince please rewrite branch history so that it looks exactly as https://github.com/magento/magento2/pull/15129/commits (cherry-pick commits instead of redoing them) |
Port already done in #16820 |
Original Pull Request
#15129
Description
parent::getValue()
can return false while$this->configuredOptions->getItemOptionsValue
only accepts float. So if the parent method returns false then it fails with the following error: