[wp-trac] [WordPress Trac] #54973: Failed wp_insert_category() when IMPORT_DEBUG is set to true produces a fatal error.

WordPress Trac noreply at wordpress.org
Wed Feb 2 18:53:52 UTC 2022


#54973: Failed wp_insert_category() when IMPORT_DEBUG is set to true produces a
fatal error.
--------------------------+----------------------------
 Reporter:  enshrined     |       Owner:  (none)
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  WordPress.org
Component:  Import        |     Version:
 Severity:  normal        |  Resolution:
 Keywords:  has-patch     |     Focuses:
--------------------------+----------------------------
Changes (by enshrined):

 * keywords:  has-patch needs-refresh => has-patch


Comment:

 @SergeyBiryukov is correct; as far as I can see, this error won't occur
 with any of the other instances as they return `WP_Error` objects.

 I've attached a new patch that means the `wp_insert_category()` call
 returns a `WP_Error` object. I agree; this approach makes more sense as
 it's more consistent with the rest of the script.

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


More information about the wp-trac mailing list