FACT-Finder-Web-Components / magento2-module

FACT-Finder® Web Components for Magento 2
https://web-components.fact-finder.de/
Other
11 stars 17 forks source link

mb_convert_encoding(): Handling HTML entities via mbstring is deprecated #510

Open fritzmg opened 4 weeks ago

fritzmg commented 4 weeks ago

While generating the product feed, the following error occurs:

  [Exception]                                                                                                                                                                                                                                                                          
  Deprecated Functionality: mb_convert_encoding(): Handling HTML entities via mbstring is deprecated; use htmlspecialchars, htmlentities, or mb_encode_numericentity/mb_decode_numericentity instead in vendor/omikron/magento2-fact  
  finder/src/Model/Filter/TextFilter.php on line 17                                                                                                                                                                                                                                    

Exception trace:
  at vendor/magento/framework/App/ErrorHandler.php:62
 Magento\Framework\App\ErrorHandler->handler() at n/a:n/a
 mb_convert_encoding() at vendor/omikron/magento2-factfinder/src/Model/Filter/TextFilter.php:17
 Omikron\Factfinder\Model\Filter\TextFilter->filterValue() at n/a:n/a
 array_map() at vendor/omikron/magento2-factfinder/src/Model/Export/Catalog/AttributeValuesExtractor.php:77
 Omikron\Factfinder\Model\Export\Catalog\AttributeValuesExtractor->getAttributeValues() at vendor/omikron/magento2-factfinder/src/Model/Export/Catalog/ProductField/GenericField.php:39
 Omikron\Factfinder\Model\Export\Catalog\ProductField\GenericField->getValue() at vendor/omikron/magento2-factfinder/src/Model/Export/Catalog/ProductType/SimpleDataProvider.php:57
 Omikron\Factfinder\Model\Export\Catalog\ProductType\SimpleDataProvider->Omikron\Factfinder\Model\Export\Catalog\ProductType\{closure}() at n/a:n/a
 array_reduce() at vendor/omikron/magento2-factfinder/src/Model/Export/Catalog/ProductType/SimpleDataProvider.php:55
 Omikron\Factfinder\Model\Export\Catalog\ProductType\SimpleDataProvider->toArray() at vendor/magento/framework/Interception/Interceptor.php:58
 Omikron\Factfinder\Model\Export\Catalog\ProductType\SimpleDataProvider\Interceptor->___callParent() at vendor/magento/framework/Interception/Interceptor.php:138
 Omikron\Factfinder\Model\Export\Catalog\ProductType\SimpleDataProvider\Interceptor->Magento\Framework\Interception\{closure}() at vendor/magento/framework/Interception/Interceptor.php:153
 Omikron\Factfinder\Model\Export\Catalog\ProductType\SimpleDataProvider\Interceptor->___callPlugins() at generated/code/Omikron/Factfinder/Model/Export/Catalog/ProductType/SimpleDataProvider/Interceptor.php:23
 Omikron\Factfinder\Model\Export\Catalog\ProductType\SimpleDataProvider\Interceptor->toArray() at vendor/omikron/magento2-factfinder/src/Model/Exporter.php:22
 Omikron\Factfinder\Model\Exporter->exportEntities() at vendor/omikron/magento2-factfinder/src/Model/Export/Feed.php:34

While this is only a deprecation, it causes an error in Magento as Magneto uses error_reporting(E_ALL) (for some reason) in its bootstrap.php.

Rayn93 commented 2 weeks ago

Hi @fritzmg It was already fixed in v5.x: https://github.com/FACT-Finder-Web-Components/magento2-module/commit/4b48502125ddd5675ff1f65ff745e5e8a1a95aad

I will prepare fix for this deprecation alswo for SDK v4.x. Thanks for notice it.