Support » Plugin: Contextual Related Posts » [PATCH] Some undefined offsets

  • Resolved flynsarmy

    (@flynsarmy)


    With WP_DEBUG on I’m getting a few warnings on the widgets list page. In /plugins/contextual-related-posts/contextual-related-posts.php:307
    change

    $title = esc_attr($instance['title']);
    $limit = esc_attr($instance['limit']);
    $show_excerpt = esc_attr($instance['show_excerpt']);
    $post_thumb_op = esc_attr($instance['post_thumb_op']);
    $thumb_height = esc_attr($instance['thumb_height']);
    $thumb_width = esc_attr($instance['thumb_width']);

    to

    $title = isset($instance['title']) ? esc_attr($instance['title']) : '';
    $limit = isset($instance['limit']) ? esc_attr($instance['limit']) : '';
    $show_excerpt = isset($instance['show_excerpt']) ? esc_attr($instance['show_excerpt']) : '';
    $post_thumb_op = isset($instance['post_thumb_op']) ? esc_attr($instance['post_thumb_op']) : '';
    $thumb_height = isset($instance['thumb_height']) ? esc_attr($instance['thumb_height']) : '';
    $thumb_width = isset($instance['thumb_width']) ? esc_attr($instance['thumb_width']) : '';

    http://wordpress.org/plugins/contextual-related-posts/

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘[PATCH] Some undefined offsets’ is closed to new replies.