Upgrading M2 from 2.2.3 to 2.3 gives me the following error during the magento setup:upgrade
process:
PHP Fatal error: Uncaught TypeError: explode() expects parameter 2 to be string, boolean given in /vendor/magento/module-configurable-product/Setup/Patch/Data/UpdateManufacturerAttribute.php:55
/vendor/magento/module-eav/Setup/EavSetup.php::getAttribute
can return false - which it does in my case:
$eavSetup->getAttribute(\Magento\Catalog\Model\Product::ENTITY, 'manufacturer', 'apply_to')
returns bool(false)
See vendor/magento/module-eav/Setup/EavSetup.php
line 1163:
if ($field !== null) {
return isset($row[$field]) ? $row[$field] : false;
}
The update script vendor/magento/module-configurable-product/Setup/Patch/Data/UpdateManufacturerAttribute.php
in Line 55 does not check for booleans.
$relatedProductTypes = explode(
',',
$eavSetup->getAttribute(\Magento\Catalog\Model\Product::ENTITY, 'manufacturer', 'apply_to')
);
How do I fix this error?
Simply skipping this by exiting if the value is false gives me another error:
PHP Fatal error: Uncaught Exception: User Error: Some transactions have not been committed or rolled back in /vendor/magento/framework/DB/Adapter/Pdo/Mysql.php on line 3955 ...