[wp-trac] [WordPress Trac] #18310: Attachments inserted with NULL value for GUID
WordPress Trac
noreply at wordpress.org
Wed Jul 10 06:15:35 UTC 2013
#18310: Attachments inserted with NULL value for GUID
--------------------------------------------------+---------------------
Reporter: docfish | Owner: nacin
Type: defect (bug) | Status: closed
Priority: normal | Milestone: 3.6
Component: XML-RPC | Version: 3.2.1
Severity: normal | Resolution: fixed
Keywords: has-patch mobile commit dev-feedback |
--------------------------------------------------+---------------------
Comment (by nacin):
Code in wp_insert_attachment() should probably model wp_insert_post()
here:
{{{
if ( !$update && '' == $current_guid )
$wpdb->update( $wpdb->posts, array( 'guid' => get_permalink(
$post_ID ) ), $where );
}}}
The `! $update` is key. Anyway, #21963 or a new ticket.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/18310#comment:17>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list