-
Notifications
You must be signed in to change notification settings - Fork 9.4k
Closed
Labels
Component: CatalogIssue: Cannot ReproduceCannot reproduce the issue on the latest `2.4-develop` branchCannot reproduce the issue on the latest `2.4-develop` branchIssue: Format is validGate 1 Passed. Automatic verification of issue format passedGate 1 Passed. Automatic verification of issue format passedIssue: Ready for WorkGate 4. Acknowledged. Issue is added to backlog and ready for developmentGate 4. Acknowledged. Issue is added to backlog and ready for developmentbug report
Description
Getting exception: Call to a member function isFile() on null in .../vendor/magento/module-catalog/Model/Product/Option/Type/File.php on line 452. If use payment methods other than PayPal it does not fail - copyQuoteToOrder function is used when use PayPal. In this function _rootDirectory variable never initialized anywhere and is therefore null. If I modify code and initialize the variable correctly using
$filesystem->getDirectoryWrite(DirectoryList::MEDIA) it fixes the issue partially - the order will be created and link is generated like site.com/sales/download/downloadCustomOption/id/19/key/e45e0dc5bb08417063e6/?SID=xxxxxxxxxxx, but if I click the link "page not found" pops-up
Preconditions
- Magento v2.1 CE
- PHP 7.0
Steps to reproduce
- Set up PayPal Express
- Create product with image upload custom option
- in front-end upload image and proceed to checkout using PayPal
Expected result
- Order should be created
- In order there should be link of the image.
- If you click the link to image the image should be downloaded
Actual result
- Server returns 500 error. PHP error log contains: PHP Fatal error: Call to a member function isFile() on null in .../vendor/magento/module-catalog/Model/Product/Option/Type/File.php on line 452
Metadata
Metadata
Assignees
Labels
Component: CatalogIssue: Cannot ReproduceCannot reproduce the issue on the latest `2.4-develop` branchCannot reproduce the issue on the latest `2.4-develop` branchIssue: Format is validGate 1 Passed. Automatic verification of issue format passedGate 1 Passed. Automatic verification of issue format passedIssue: Ready for WorkGate 4. Acknowledged. Issue is added to backlog and ready for developmentGate 4. Acknowledged. Issue is added to backlog and ready for developmentbug report