Jetpack by WordPress.com
[resolved] Bug in delete_post handling, invalid id (3 posts)

  1. Dean Taylor
    Posted 3 years ago #

    I was reviewing the code for JetPack and found the following code in /jetpack/jetpack.php, Jetpack 2.0.4, line 4063:

    function delete_post_action( $post_id ) {
    		$post = get_post( $post_id );
    		if ( !$post ) {
    			return $this->register( 'delete_post', (int) $id );
    		$this->transition_post_status_action( 'delete', $post->post_status, $post );

    Note that the call to $this->register includes an undeclared variable $id, I believe this should be $post_id.

    Hope this helps,


  2. Christopher Finke
    Design Engineer at Automattic
    Plugin Contributor

    Posted 3 years ago #

    Thanks for the report; we'll get this fixed.

  3. Jeremy Herve
    Jetpack Mechanic
    Plugin Author

    Posted 3 years ago #

    We've now fixed the issue:

    The fix will be part of the next Jetpack release.

    Thanks again for the report!

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Jetpack by WordPress.com
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic