﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	severity	resolution	keywords	cc
22204	XML-RPC _insert_post error when updating a post with a thumbnail.	picklepete	ryan	"'''Versions affected''': 3.4+[[BR]]
'''Summary''': Updating a post with wp_editPost is throwing an ""Invalid attachment ID"" error due to a [http://core.trac.wordpress.org/browser/tags/3.4/wp-includes/post.php#L5165 change to set_post_thumbnail in 3.4]. In [http://core.trac.wordpress.org/browser/tags/3.3.3/wp-includes/post.php#L5180 3.3.3 and earlier] ""true"" was always returned. Now, when [http://core.trac.wordpress.org/browser/tags/3.4.2/wp-includes/class-wp-xmlrpc-server.php#L1048 the post_thumbnail] is [http://core.trac.wordpress.org/browser/tags/3.4.2/wp-includes/meta.php#L130 compared against the existing post_thumbnail] the ""false"" which is returned bubbles up to set_post_thumbnail and an ""Invalid attachment ID"" is thrown.

The attached patch satisfies two needs:

1. That the attachment's existence is tested, and if it's invalid, an ""Invalid attachment ID"" error is thrown.
2. That it should be possible for set_post_thumbnail to execute and return false, which it will if the post thumbnail hasn't been changed."	defect (bug)	closed	normal	3.5	XML-RPC	3.4.2	major	fixed	has-patch commit	maxcutler
