Skip to content
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

Update method to match doc comments #4721

Closed
wants to merge 2 commits into from
Closed

Update method to match doc comments #4721

wants to merge 2 commits into from

Conversation

adamzero1
Copy link
Contributor

When using the "reorder" functionality from the customer account page, if the order contains items that do not have required options. The following error is displayed:

Fatal error: Uncaught TypeError: Argument 1 passed to Magento\Framework\DataObject::__construct() must be of the type array, null given, called in htdocs/vendor/magento/module-checkout/Model/Cart.php on line 264 and defined in htdocs/vendor/magento/framework/DataObject.php:38
Stack trace:
#0 htdocs/vendor/magento/module-checkout/Model/Cart.php(264): Magento\Framework\DataObject->__construct(NULL)
#1 htdocs/var/generation/Magento/Checkout/Model/Cart/Interceptor.php(102): Magento\Checkout\Model\Cart->addOrderItem(Object(Magento\Sales\Model\Order\Item), NULL)
#2 htdocs/vendor/magento/module-sales/Controller/AbstractController/Reorder.php(59): Magento\Checkout\Model\Cart\Interceptor->addOrderItem(Object(Magento\Sales\Model\Order\Item))
#3 htdocs/var/generation/Magento/Sales/Controller/Order/Reorder/Interceptor.php(24): Magento\Sales\Controller\AbstractController\Reorder->execute()
#4 htdocs/vend in htdocs/vendor/magento/framework/DataObject.php on line 38

@@ -485,7 +485,7 @@ public function getProductOptionByCode($code = null)
if (isset($options[$code])) {
return $options[$code];
}
return null;
return []];

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@adamzero1, thank you for contribution. Please fix syntax error.

@adamzero1 adamzero1 closed this May 27, 2016
magento-engcom-team pushed a commit that referenced this pull request Sep 3, 2019
[Performance] Fix missing shims and phtml files with mage-init directives
@kinjalmehta153
Copy link

kinjalmehta153 commented Oct 17, 2022

Hello All ,

db43c11

this pr is not able to merge in magento migration process 2.3 to 2.4.5

Applying patches for magento/module-theme
patches/composer/M231/github-pr-4721-theme.diff ([Performance] Fix missing shims and phtml files with mage-init directives (db43c11))
Could not apply patch! Skipping. The error was: Cannot apply patch patches/composer/M231/github-pr-4721-theme.diff

[Exception]
Cannot apply patch [Performance] Fix missing shims and phtml files with mage-init directives (db43c11) (patches/composer/M
231/github-pr-4721-theme.diff)!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants