WidgetOptions / widget-options

Additional Widget options for better widget control. Available on
https://widget-options.com/
GNU General Public License v3.0
35 stars 16 forks source link

Undefined index 'settings' in widget-options\includes\widgets\display.php #65

Open SeanDKendle opened 5 years ago

SeanDKendle commented 5 years ago

Undefined index: settings in ...\wp-content\plugins\widget-options\includes\widgets\display.php on line 439:

        $get_classes = widgetopts_classes_generator( $opts, $widget_options, $widget_options['settings'] );

Should check if isset($widget_options['settings']) before attempting to use, or initialize $widget_options['settings'] to null and check against that later.

Error goes away after turning on at least one setting under Plugins > Widget Options > Settings > Pages Visibility > Configure Settings


WordPress v4.9.10 PHP v5.6

SeanDKendle commented 5 years ago

Working fix for me:

if(isset($widget_options['settings']))
        $get_classes = widgetopts_classes_generator( $opts, $widget_options, $widget_options['settings'] );
else
    $get_classes = array();