mirror of
https://github.com/WordPress/WordPress.git
synced 2024-09-29 07:37:44 +02:00
Include post_content_filtered in queries to comply with MySQL strict mode. fixes #3112
git-svn-id: http://svn.automattic.com/wordpress/branches/2.0@4530 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
57ff8770c0
commit
0c3ff47735
@ -302,6 +302,7 @@ function wp_insert_attachment($object, $file = false, $post_parent = 0) {
|
||||
post_date = '$post_date',
|
||||
post_date_gmt = '$post_date_gmt',
|
||||
post_content = '$post_content',
|
||||
post_content_filtered = '$post_content_filtered',
|
||||
post_title = '$post_title',
|
||||
post_excerpt = '$post_excerpt',
|
||||
post_status = '$post_status',
|
||||
@ -321,9 +322,9 @@ function wp_insert_attachment($object, $file = false, $post_parent = 0) {
|
||||
} else {
|
||||
$wpdb->query(
|
||||
"INSERT INTO $wpdb->posts
|
||||
(post_author, post_date, post_date_gmt, post_content, post_title, post_excerpt, post_status, comment_status, ping_status, post_password, post_name, to_ping, pinged, post_modified, post_modified_gmt, post_parent, menu_order, post_mime_type, guid)
|
||||
(post_author, post_date, post_date_gmt, post_content, post_content_filtered, post_title, post_excerpt, post_status, comment_status, ping_status, post_password, post_name, to_ping, pinged, post_modified, post_modified_gmt, post_parent, menu_order, post_mime_type, guid)
|
||||
VALUES
|
||||
('$post_author', '$post_date', '$post_date_gmt', '$post_content', '$post_title', '$post_excerpt', '$post_status', '$comment_status', '$ping_status', '$post_password', '$post_name', '$to_ping', '$pinged', '$post_date', '$post_date_gmt', '$post_parent', '$menu_order', '$post_mime_type', '$guid')");
|
||||
('$post_author', '$post_date', '$post_date_gmt', '$post_content', '$post_content_filtered', '$post_title', '$post_excerpt', '$post_status', '$comment_status', '$ping_status', '$post_password', '$post_name', '$to_ping', '$pinged', '$post_date', '$post_date_gmt', '$post_parent', '$menu_order', '$post_mime_type', '$guid')");
|
||||
$post_ID = $wpdb->insert_id;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user