[wp-trac] [WordPress Trac] #41008: WP_Error wrote instead of category name in wp_options table, category_base field

WordPress Trac noreply at wordpress.org
Tue Sep 8 21:18:18 UTC 2020


#41008: WP_Error wrote instead of category name in wp_options table, category_base
field
--------------------------+------------------------------
 Reporter:  Neilgaiman    |       Owner:  (none)
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  Awaiting Review
Component:  Permalinks    |     Version:  4.8
 Severity:  normal        |  Resolution:
 Keywords:                |     Focuses:
--------------------------+------------------------------

Comment (by SergeyBiryukov):

 Hi there, welcome to WordPress Trac! Thanks for the report.

 This is somewhat similar to #50850, specifically comment:2:ticket:50850.

 Adding some protection against an invalid value sounds good in general,
 but this doesn't seem any different from accidentally setting an invalid
 value for any other option. I don't think we can realistically protect
 against that, so the warning seems appropriate here to notify the site
 owner that something is wrong. Hiding the warning or attempting to work
 around it would only make debugging harder.

 If there is a path in core where accidentally setting a `WP_Error` value
 for `category_base` can be easily reproduced with a specific example,
 demonstrating that would probably be a good idea for the ticket to move
 forward.

 The comments on the linked post point to a similar error message
 ("Recoverable fatal error: Object of class WP_Error could not be converted
 to string"), but in quite a different context: `wp-
 includes/formatting.php` or a theme's `eventchamp/include/speaker-
 modules.php` file. So far, this doesn't seem like a common issue.

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


More information about the wp-trac mailing list