• Hi,

    Not a major problem, but I was getting warnings for undefined indexes.

    I added the following lines

    if(empty($instance)) $instance = array('title' => '', 'post_type' => '', 'orderby' => '', 'maxlines' => '', 'pformat' => '', 'desc' => '', 'trunc' => '');
    		if(!isset($instance['desc'])) $instance['desc'] = 'false';
    		if(!isset($instance['trunc'])) $instance['trunc'] = 'false';

    on line 28 and 128, which stops the error messages.

    Mei

    http://wordpress.org/extend/plugins/custom-post-type-list-widget/

Viewing 2 replies - 1 through 2 (of 2 total)
  • I’m getting the same errors. Fixed it also. Would be nice to have these changes in the plugin if you can get to it.

    +1

    My fix is essentially the same:

    $desc = $trunc = false;
    if ( !empty( $instance['desc'] ) )
    	$desc = esc_attr($instance['desc']);
    if ( !empty( $instance['trunc'] ) )
    	$trunc = esc_attr($instance['trunc']);
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘[Plugin: Custom Post Type List Widget] Undefined index errors’ is closed to new replies.