Version 1.2.13 produces warnings for unused widgets
-
Starting with version 1.2.13, All Bootstrap Blocks generates warnings in class.areoi.styles.php on line 212 for all unused widgets.
PHP Notice: Undefined index: owm_weather_shortcode_widget-6 in /var/www/html/wordpress/wp-content/plugins/all-bootstrap-blocks/class.areoi.styles.php on line 212
I fixed this by an additional check inside the loop:
$widget_blocks = array(); if ( !empty( $widget_block ) && !empty( $sidebars_widgets ) && is_array( $sidebars_widgets ) ) { foreach ( $sidebars_widgets as $sidebar_widget_key => $sidebar_widget ) { foreach ( $sidebar_widget as $block_key => $block ) { $block_key = str_replace( 'block-', '', $block ); if (!empty($widget_block[$block_key])) { $block = $widget_block[$block_key]; $widget_blocks = array_merge( parse_blocks( $block['content'] ), $widget_blocks ); } } } }
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘Version 1.2.13 produces warnings for unused widgets’ is closed to new replies.