[wp-trac] [WordPress Trac] #37813: Missing $wp_error parameter for wp_insert_attachment

WordPress Trac noreply at wordpress.org
Fri Aug 26 15:55:07 UTC 2016


#37813: Missing $wp_error parameter for wp_insert_attachment
-------------------------------------------------+-------------------------
 Reporter:  grapplerulrich                       |       Owner:
     Type:  enhancement                          |  grapplerulrich
 Priority:  normal                               |      Status:  assigned
Component:  Media                                |   Milestone:  4.7
 Severity:  normal                               |     Version:  2.0
 Keywords:  good-first-bug has-patch needs-      |  Resolution:
  testing                                        |     Focuses:
-------------------------------------------------+-------------------------

Comment (by mrahmadawais):

 Replying to [comment:6 grapplerulrich]:
 > I have updated my patch. I followed the docs in
 https://make.wordpress.org/core/handbook/contribute/git/
 > Could there be a mistake there in step 4?

 I am using SVN diff at the moment. Will check that later.

 `@since 4.7.0 Add fourth paramater `$wp_error` to allow  return of
 WP_Error on failure.`

 @since is used to depict when was this function introduced. It's not a
 changelog. So, the line above should not be there. Take a look at my patch
 https://core.trac.wordpress.org/attachment/ticket/37813/37813.diff and see
 if there is anything wrong with it. You can use Grunt WP patch
 https://github.com/aaronjorbin/grunt-patch-wordpress to apply the patch.

 Let me know.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/37813#comment:7>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list