M2.4.7, v1.5.3: $parent is set to null but needs to be checked before any function is called

Created by Esther Nguyen, Modified on Tue, 8 Oct at 10:51 AM by Esther Nguyen

ISSUE:


I'm getting the following exception:


Error: Call to a member function getName() on null in /Users/gaz/Sites/nws2/http/vendor/bsscommerce/simple-detail-configurable/Helper/ProductData.php:310


This is because the recent changes added to your module. It's fine that $parent is set to null but it needs to be checked before any function is called on it.


SOLUTION:


To resolve the issue, please edit the file app/code/Bss/Simpledetailconfigurable/Helper/ProductData.php as below:


If you need any further assistance, please feel free to contact us. We'd be happy to support you!

Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select at least one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article