[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
Mon Jun 12 12:37:14 UTC 2017


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

Comment (by Neilgaiman):

 As explained in my post, the easiest workaround seems to set the
 category_base value empty (''empty string''): that way the
 '''category_base''' original value is lost but at least the website
 doesn't crash.

 Other viable fixes could include the following:

 - trap the '''rewrite.php''' method (using try/catch) so that it won't
 crash the web application (weak)

 - throw/log/output the WP_Error to the user instead of silently writing it
 into the '''category_base''' value (probably the best approach)

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


More information about the wp-trac mailing list