Skip to content

Fatal Error: 'Uncaught Error: Call to a member function getSku() on array in Magento/InventorySourceSelection/Model/Algorithms/PriorityBasedAlgorithm.php:84 #1377

Closed
@TomashKhamlai

Description

@TomashKhamlai

Preconditions

  1. Magento MSI

Steps to reproduce

  1. Run api-functional test app/code/Magento/InventorySourceSelectionApi/Test/Api/SourceSelectionServiceTest

Expected result

  1. TESTS_WEB_API_ADAPTER is defined or other reason

Actual result

  1. Server internal error.
"Fatal Error: 'Uncaught Error: Call to a member function getSku() on array in \/var\/www\/html\/msi\/app\/code\/Magento\/InventorySourceSelection\/Model\/Algorithms\/PriorityBasedAlgorithm.php:84
Stack trace:
#0 \/var\/www\/html\/msi\/app\/code\/Magento\/InventorySourceSelection\/Model\/SourceSelectionService.php(62): Magento\\InventorySourceSelection\\Model\\Algorithms\\PriorityBasedAlgorithm->execute(Object(Magento\\InventorySourceSelection\\Model\\Request\\InventoryRequest))
#1 [internal function]: Magento\\InventorySourceSelection\\Model\\SourceSelectionService->execute(Object(Magento\\InventorySourceSelection\\Model\\Request\\InventoryRequest), 'priority')
#2 \/var\/www\/html\/msi\/app\/code\/Magento\/Webapi\/Controller\/Rest\/SynchronousRequestProcessor.php(95): call_user_func_array(Array, Array)
#3 \/var\/www\/html\/msi\/app\/code\/Magento\/Webapi\/Controller\/Rest.php(188): Magento\\Webapi\\Controller\\Rest\\SynchronousRequestProcessor->process(Object(Magento\\Framework\\Webapi\\Rest\\Request\\Proxy))
#4 \/var\/www\/html\/msi\/lib\/internal\/Magento\/Framework\/Interception\/Interceptor.php' in '\/var\/www\/html\/msi\/app\/code\/Magento\/InventorySourceSelection\/Model\/Algorithms\/PriorityBasedAlgorithm.php' on line 84"

Metadata

Metadata

Assignees

Labels

BugWEB APIMSI web API failures and fixes

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions