Make WordPress Core

Changeset 25661


Ignore:
Timestamp:
10/02/2013 07:51:57 PM (11 years ago)
Author:
wonderboymusic
Message:

post_content does not have a default value in the $wpdb->posts table. Add a default value of empty string to wp_insert_attachment() to avoid a tornado of database errors in PHP 5.5/MySQL 5.6, even when debug mode is turned off.

See #25282.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/post.php

    r25628 r25661  
    39583958    $defaults = array('post_status' => 'inherit', 'post_type' => 'post', 'post_author' => $user_ID,
    39593959        'ping_status' => get_option('default_ping_status'), 'post_parent' => 0, 'post_title' => '',
    3960         'menu_order' => 0, 'to_ping' =>  '', 'pinged' => '', 'post_password' => '',
     3960        'menu_order' => 0, 'to_ping' =>  '', 'pinged' => '', 'post_password' => '', 'post_content' => '',
    39613961        'guid' => '', 'post_content_filtered' => '', 'post_excerpt' => '', 'import_id' => 0, 'context' => '');
    39623962
Note: See TracChangeset for help on using the changeset viewer.