-
Notifications
You must be signed in to change notification settings - Fork 9.4k
Exception #0 (ReflectionException) issue fixed #39819
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?
Exception #0 (ReflectionException) issue fixed #39819
Conversation
Hi @Sathakathulla-S. Thank you for your contribution!
Allowed build names are:
You can find more information about the builds here For more details, review the Code Contributions documentation. |
@magento run all tests |
@magento run all tests |
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.
Hello @Sathakathulla-S,
Thank you for the contribution!
Please sign the CLA and fix the failed static tests. Also please refer to the below review comments.
Thanks
try { | ||
$source = $this->_universalFactory->create($this->_source); | ||
} catch (\ReflectionException $e) { | ||
$source = false; |
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.
Instead of using false
, consider returning null
to indicate the absence of a valid source object.
@@ -636,7 +636,11 @@ public function getSource() | |||
} else { | |||
$this->_source = $this->getSourceModel(); | |||
} | |||
$source = $this->_universalFactory->create($this->_source); | |||
try { |
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.
Align the try-catch
block for better readability.
Description (*)
Related Pull Requests
Fixed Issues (if relevant)
Manual testing scenarios (*)
Questions or comments
Contribution checklist (*)