-
Notifications
You must be signed in to change notification settings - Fork 9.4k
Resolve incorrect scope code selection when the requested scopeCode is null #16940
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
Resolve incorrect scope code selection when the requested scopeCode is null #16940
Conversation
…s null - resolves an issue whereby the incorrect scope could be returned when attempting to resolve a scope with a requested scopeCode of null - simplify the scope resolver logic to a avoid multiple if conditional checks - move scope interface class to an alias of the class - update docblock on the expected values available for scopeCode Signed-off-by: Matthew Muscat <[email protected]>
Hi @matthew-muscat. Thank you for your contribution
For more details, please, review the Magento Contributor Assistant documentation |
FYI - Codacy PR quality review is stating the else condition is not required - however this was present prior to my pull request. |
$resolverScopeCode = $resolverScopeCode->getCode(); | ||
} | ||
|
||
if ($scopeCode == null) { |
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.
I suggest changing this statement according to the general rule of preferring the identical comparison operator ===
over the equal one ==
.
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 @aleron75 — confirming this has been done
Hi @aleron75, thank you for the review. |
@matthew-muscat thank you for contributing. Please accept Community Contributors team invitation here to gain extended permissions for this repository. |
…d scopeCode is null #16940
…d scopeCode is null #16940
Hi @matthew-muscat. Thank you for your contribution. Please, consider to port this solution to 2.3 release line. |
Description
Resolves #16939
Fixed Issues (if relevant)
Manual testing scenarios
Contribution checklist