-
Notifications
You must be signed in to change notification settings - Fork 9.4k
35937 internal server error in /v1/carts/mine/items api endpoint #37866
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
base: 2.4-develop
Are you sure you want to change the base?
35937 internal server error in /v1/carts/mine/items api endpoint #37866
Conversation
Hi @JettyRohanAditya. Thank you for your contribution! Add the comment under your pull request to deploy test or vanilla Magento instance:
❗ Automated tests can be triggered manually with an appropriate comment:
Allowed build names are:
You can find more information about the builds here For more details, review the Code Contributions documentation. |
@JettyRohanAditya Please sign CLA |
@magento run all tests |
The requested builds are added to the queue. You should be able to see them here within a few minutes. Please message the #magento-devops slack channel if they don't show in a reasonable amount of time and a representative will look into any issues. |
…rts/mine/items-API-Endpoint
@magento run all tests |
…rts/mine/items-API-Endpoint
@magento run all tests |
@magento run all tests |
…rts/mine/items-API-Endpoint
Hello @JettyRohanAditya, Thanks for the collaboration & contribution! ✔️ QA Passed Install fresh Magento 2.4-develop Builds are failed. Hence, moving this PR to Extended Testing. Thanks |
@magento run all tests |
@magento run Unit Tests, Static Tests, Webapi Tests |
@magento run Static Tests |
@magento run all tests |
@magento run Functional Tests B2B, Functional Tests EE |
@magento run Functional Tests EE |
Moving this PR to 'Pending Review' as the changes have not yet been approved. Once the changes are approved, we will proceed further with it. Thank you for your understanding. |
Internal server error in /v1/carts/mine/items api endpoint
Description (*)
Second argument in array_key_exists($camelCaseKey, $currentArray) expects an array, but it's string here.
Added if clause to skip that.
Related Pull Requests
#35937
Fixed Issues (if relevant)
Manual testing scenarios (*)
https://magento2.docker/index.php/rest/default/V1/carts/mine/items
Changes Made:-
Changed the code
From-
if (array_key_exists($camelCaseKey, $currentArray)) {
$lastKey = $camelCaseKey;
}
To -
if (is_array($currentArray)){
if (array_key_exists($camelCaseKey, $currentArray)) {
$lastKey = $camelCaseKey;
}
$currentArray[$lastKey] = $valueToSet;
}
Contribution checklist (*)