Make WordPress Core

Opened 9 years ago

Closed 9 years ago

Last modified 8 years ago

#41513 closed enhancement (fixed)

Pass $wp_error param to wp_insert_attachment() inside wp_update_post()

Reported by: MyThemeShop Owned by: dd32
Priority: normal Milestone: 5.1
Component: Posts, Post Types Version: 4.9
Severity: normal Keywords:
Cc: Focuses:

Description

wp_update_post() have $wp_error param which is not passed to wp_insert_attachment() in case of attachment. It is not causing any issue in core, though, as far as I can see.

Attachments (1)

41513.diff (433 bytes ) - added by MyThemeShop 9 years ago.

Download all attachments as: .zip

Change History (4)

@MyThemeShop
9 years ago

#1 @dd32
9 years ago

  • Component GeneralPosts, Post Types
  • Milestone Awaiting Review5.0

Hey @MyThemeShop

Thanks for submitting this, this seems pretty straight forward and an obvious oversight from when wp_insert_attachment() didn't support returning a WP_Error.

#2 @dd32
9 years ago

  • Owner set to dd32
  • Resolutionfixed
  • Status newclosed

In 42383:

Posts: When using wp_update_post() on a attachment post_type item, pass the $wp_error parameter through to wp_insert_attachment().

Props MyThemeShop.
Fixes #41513.

#3 @johnbillion
8 years ago

  • Milestone 5.05.1
Note: See TracTickets for help on using tickets.