WordPress.org

Forums

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

  1. Dean Taylor
    Member
    Posted 2 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,
    Cheers,
    Dean.

    http://wordpress.org/extend/plugins/jetpack/

  2. Christopher Finke
    Design Engineer at Automattic
    Plugin Contributor

    Posted 2 years ago #

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

  3. Jeremy Herve
    Happiness Engineer
    Plugin Author

    Posted 2 years ago #

    We've now fixed the issue:
    http://plugins.trac.wordpress.org/changeset/650587

    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