Support » Plugin: Duplicate Post » [Plugin: Duplicate Post] Notice in 2.2

  • Resolved sparkweb


    One of my front-facing plugin pages (where I’ve admittedly been messing with the post vars) I’m getting a Notice:

    Notice: Undefined variable: post in /xxxxxxxxx/wp-content/plugins/duplicate-post/duplicate-post-common.php on line 104 Notice: Trying to get property of non-object in /xxxxxxxxxxx/wp-content/plugins/duplicate-post/duplicate-post-common.php on line 104

    That’s this line:

    'href' => duplicate_post_get_clone_post_link( $post->ID )

    If I add $post to the global at the top of that function it makes the notice go away and all still seems to work fine. Interestingly enough, the link still works, despite the notice.

    Just wanted to let you know in case it’s worth fixing in the next update. Thanks for the great work!

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Lopo


    thank you, another user already told me about this, I fixed it by changing 'href' => duplicate_post_get_clone_post_link( $post->ID ) to 'href' => duplicate_post_get_clone_post_link( $current_object->ID ) (that’s the way it was intended to be).
    The fix will be out in the next version, with a couple of other fixes.

    Thank you, bye!

    Plugin Author Lopo


    version 2.3 (out now) includes the fix for this bug.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘[Plugin: Duplicate Post] Notice in 2.2’ is closed to new replies.