[wp-trac] [WordPress Trac] #18044: `delete_post` hook has off-by-1 error in `$postid` parameter
WordPress Trac
wp-trac at lists.automattic.com
Sat Jul 9 01:18:37 UTC 2011
#18044: `delete_post` hook has off-by-1 error in `$postid` parameter
--------------------------+-----------------------------
Reporter: meitar | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Plugins | Version: 3.2
Severity: normal | Keywords:
--------------------------+-----------------------------
In WordPress 3.2, the `delete_post` hook seems to be passed the incorrect
post ID. Specifically, if a post's ID is 5, then the functioned called by
the `delete_post` hook is passed an integer value of `6`, contradicting
`$_GET['post']` (of a string value of `5`, in this example).
Attached to this ticket is a very crude plugin showing the problem. I have
tested the same plugin against WordPress 3.1.4 and the issue is not
visible there. To see the issue in action:
1. Install the plugin & activate the plugin.
1. Create a new post.
1. Delete that post.
Is this a regression?
--
Ticket URL: <http://core.trac.wordpress.org/ticket/18044>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list