The visibility options are still applied as expected at this time, but may not in future versions of PHP or similar with warnings behing served.
Notice: Undefined variable: attributes in /sites/testsite.localhost/files/public/wp-content/plugins/block-visibility/includes/frontend/visibility-tests/wp-fusion.php on line 100
Step-by-step reproduction instructions
Enable debugging on your site
Add a block, and add visibility options with WP Fusion enabled
Visit the front-end of your site where the block should be shown, making sure that no other rules previously would have set $is_visible to true
Observe warnings being thrown once per block that has visibility settings in place.
Expected behavior
No warnings should be generated by the base plugin.
Actual behavior
Warnings are thrown.
System information
Block Visibility version: 2.2.0
Block Visibility Pro version: 1.3.2
WordPress version: 5.8.2
Gutenberg version: Not installed
Are all plugins except Block Visibility, Block Visibility Pro (if installed), and Gutenberg (if installed) deactivated? No
Are you using a default theme (e.g. Twenty Twenty-One)? No
Description
When using WP Fusion checks with Block Visibility, warnings are thrown that
$attributes
are undefined.This is coming from https://github.com/ndiego/block-visibility/blob/baa04dfcf2cbd0439baee6420357cd240d6338cd/includes/frontend/visibility-tests/wp-fusion.php#L99-L102 wherethe variable is used as part of a filter, but the variable has not been declared prior to this.
The visibility options are still applied as expected at this time, but may not in future versions of PHP or similar with warnings behing served.
Step-by-step reproduction instructions
$is_visible
totrue
Expected behavior
No warnings should be generated by the base plugin.
Actual behavior
Warnings are thrown.
System information