You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When updating to v7.2.0, there is no default value for this config entry. As a result, when explode is executed on a null value, it triggers a PHP error:
Deprecated: explode(): Passing null to parameter #2 ($string) of type string is deprecated
This forces users to manually save the core_config data after updating, which is unintuitive and may lead to unexpected errors if overlooked.
Environment
PHP Version: 8.2
Magento Version: 2.4.7-p3
Magento Enterprise: No
Tweakwise Export Version: v7.2.0
Magento Deploy Mode: Production
Third-party modules: N/A
Steps to Reproduce
Install Magento with the Tweakwise Export v7.1.0 module.
Ensure the Magento shop has some composite-type products (e.g., Configurable or Bundle products).
Upgrade to v7.2.0.
Attempt to generate a product feed without manually saving the config.
Observe the PHP error during execution.
Actual Result
A PHP error occurs due to explode() receiving null instead of a string.
Deprecated: explode(): Passing null to parameter #2 ($string) of type string is deprecated
Expected Result
The module should provide a fallback value for tweakwise/export/exclude_child_attributes to prevent errors.
No manual saving of core_config data should be required after an update.
Suggested Fix
Ensure getValue() provides a default value (e.g., an empty string '' or default attributes) before calling explode().
Implement a configuration migration script to set a default value during installation.
Issue Brief
After updating to Tweakwise Export v7.2.0, the new functionality:
Features:
b648d9a
)introduces errors during feed generation due to the absence of a fallback value for the new config entry
tweakwise/export/exclude_child_attributes
.Problem
In
Model/Config.php
, the following code attempts to explode a config value:When updating to v7.2.0, there is no default value for this config entry. As a result, when
explode
is executed on anull
value, it triggers a PHP error:This forces users to manually save the core_config data after updating, which is unintuitive and may lead to unexpected errors if overlooked.
Environment
Steps to Reproduce
Actual Result
explode()
receivingnull
instead of a string.Expected Result
tweakwise/export/exclude_child_attributes
to prevent errors.Suggested Fix
getValue()
provides a default value (e.g., an empty string''
or default attributes) before callingexplode()
.This would prevent the issue and make the upgrade process seamless.
The text was updated successfully, but these errors were encountered: