• I am getting the following notice error when I have debug turned on:

    Notice: Undefined index: postviews_id in /wordpress/wp-content/plugins/wp-postviews/wp-postviews.php on line 646

    Line 646 is currently set as:

    $post_id = intval($_GET['postviews_id']);

    To remove the notice error, it just needs to be changed to:

    $post_id = isset($_GET['postviews_id']) ? intval($_GET['postviews_id']) : 0;

    Hope that helps!

Viewing 8 replies - 1 through 8 (of 8 total)
  • Thread Starter bensinclair

    (@bensinclair)

    Found another one:

    Notice: Undefined index: views in /wordpress/wp-content/plugins/wp-postviews/wp-postviews.php on line 67

    Line 67:

    $post_views = intval($post_views['views'][0]);

    Should be:

    $post_views = isset($post_views['views'][0]) ? intval($post_views['views'][0]) : 0;

    Plugin Author scribu

    (@scribu)

    Ok, so why did you tag this topic with wp-pagenavi?

    Thread Starter bensinclair

    (@bensinclair)

    Because the error is in the WP-Pagenavi plugin…

    Plugin Author scribu

    (@scribu)

    Mhm… so in what file and version of WP-PageNavi should I make the fixes you suggest?

    Thread Starter bensinclair

    (@bensinclair)

    Version 1.50 and in the /we-content/plugins/wp-postviews/wp-postviews.php

    Plugin Author scribu

    (@scribu)

    Ok, well, wp-postviews/wp-postviews.php is not part of the WP-PageNavi plugin, nor does WP-PageNavi have any integration with it.

    Thread Starter bensinclair

    (@bensinclair)

    LOL that would explain why you were confused at the start. My bad I’m sorry. Is there anyway for me to change the tag on this or will I have to repost?

    Plugin Author scribu

    (@scribu)

    You should have an [x] next to the wp-pagenavi tag.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘[Plugin: WP-PageNavi] Notice error when debug is turned on’ is closed to new replies.