[wp-trac] [WordPress Trac] #23474: wp_update_post returns incorrect WP_Error on invalid ID (if $wp_error is set)
WordPress Trac
noreply at wordpress.org
Thu Feb 28 21:08:26 UTC 2013
#23474: wp_update_post returns incorrect WP_Error on invalid ID (if $wp_error is
set)
------------------------------------+------------------
Reporter: simonwheatley | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: 3.6
Component: Warnings/Notices | Version: 3.5
Severity: normal | Resolution:
Keywords: has-patch dev-feedback |
------------------------------------+------------------
Comment (by nacin):
I guess wp_update_post() can hypothetically be used to create posts, but
since wp_insert_post() then assumes if an ID is passed it is dealing with
an update, things start to get wonky.
It would likely be best to fix this in both functions.
We can use "Invalid post ID." which is an existing string.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/23474#comment:3>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list