WordPress.org

Make WordPress Core


Ignore:
Timestamp:
06/07/2020 09:22:07 AM (17 months ago)
Author:
SergeyBiryukov
Message:

Posts, Post Types: Display a more specific error message when an attachment could not be inserted into the database.

Props shital-patel, Presskopp, ocean90.
Fixes #50325.

File:
1 edited

Legend:

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

    r47851 r47922  
    206206        if ( false === $wpdb->update( $wpdb->links, compact( 'link_url', 'link_name', 'link_image', 'link_target', 'link_description', 'link_visible', 'link_owner', 'link_rating', 'link_rel', 'link_notes', 'link_rss' ), compact( 'link_id' ) ) ) {
    207207            if ( $wp_error ) {
    208                 return new WP_Error( 'db_update_error', __( 'Could not update link in the database' ), $wpdb->last_error );
     208                return new WP_Error( 'db_update_error', __( 'Could not update link in the database.' ), $wpdb->last_error );
    209209            } else {
    210210                return 0;
     
    214214        if ( false === $wpdb->insert( $wpdb->links, compact( 'link_url', 'link_name', 'link_image', 'link_target', 'link_description', 'link_visible', 'link_owner', 'link_rating', 'link_rel', 'link_notes', 'link_rss' ) ) ) {
    215215            if ( $wp_error ) {
    216                 return new WP_Error( 'db_insert_error', __( 'Could not insert link into the database' ), $wpdb->last_error );
     216                return new WP_Error( 'db_insert_error', __( 'Could not insert link into the database.' ), $wpdb->last_error );
    217217            } else {
    218218                return 0;
Note: See TracChangeset for help on using the changeset viewer.