M2.4.5, v1.2.0: Fix conflict with PHP 8.1

Created by Esther Nguyen, Modified on Wed, 22 Apr at 12:05 AM by Support Agent

ISSUE:

Unfortunately, I always get an error message during the import process (use your sample file):

 

systemException

Additional data: <div class="messages"><div class="message message-error error"><div data-ui-id="messages-message-error" >Deprecated Functionality: explode(): Passing null to parameter #2 ($string) of type string is deprecated in /var/www/magento/vendor/bsscommerce/product-attributes-import-export/Model/Import/ProductAttributes/Validator/Attribute.php on line 195</div></div></div>


Have Magento 2.4.5 installed (PHP8.1).

 


SOLUTION:

There is a conflict issue between our module and PHP 8.1 in the explode function


To resolve this issue, please download the file attached below and override with the current files on your site:

app/code/Bss/ProductAttributesImportExport/Model/Import/ProductAttributes.php

app/code/Bss/ProductAttributesImportExport/Model/Import/ProductAttributes/Validator/Attribute.php


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


Why choosing BSS Commerce?


BSS Commerce is a full-service ecommerce agency with 14+ years of experience, supporting 75,000+ customers worldwide. As an Adobe Commerce Solution Bronze Partner and Select Magento Extensions Builder, we deliver trusted end-to-end solutions.


Our core strength is Magento, with 150+ extensions designed to enhance store performance and drive growth. With deep expertise from years of working on Magento websites, we deliver scalable, high-impact solutions backed by strong client trust.


Discover our extensions: https://bsscommerce.com/magento-2-extensions.html 


Our top-tier extensions:






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