- 🇺🇸United States sgroundwater
I hit the same error w/ PHP 8.x. I let AI help me with a possible fix. In case it helps others.
---
The error message indicates that the property "options" is being modified on a null value in the function flexslider_optionset_load().To fix this issue, you can add a null check before attempting to modify the "options" property. Here's an updated version of the code that includes the null check:
/** * Fetches the given option set and returns it as an object or NULL if no set could be found. */ function flexslider_optionset_load($optionset_name) { ctools_include('export'); $optionset = ctools_export_crud_load('flexslider_optionset', $optionset_name); if ($optionset !== null) { // Ensure the optionset is typecast after being loaded from DB _flexslider_typecast_optionset($optionset->options); } return $optionset; }
In the updated code, we added an if statement to check if $optionset is not null before attempting to modify the "options" property. If $optionset is null, the modification will not be executed.
By including this null check, you can prevent the "Attempt to modify property on null" error.
- 🇮🇳India dineshkumarbollu
Provided the patch changes suggested in #3, please review