WordPress.org

Forums

Contextual Related Posts
[resolved] [PATCH] Some undefined offsets (3 posts)

  1. flynsarmy
    Member
    Posted 2 years ago #

    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/

  2. Ajay
    Member
    Plugin Author

    Posted 2 years ago #

    Thank you. I'll implement this in the next version.

  3. Ajay
    Member
    Plugin Author

    Posted 1 year ago #

    This has been fixed in the latest version of the plugin

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Contextual Related Posts
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic

Tags

No tags yet.