[wp-trac] [WordPress Trac] #38777: Add method to merge one WP_Error into another

WordPress Trac noreply at wordpress.org
Thu Oct 8 02:38:24 UTC 2020


#38777: Add method to merge one WP_Error into another
--------------------------------------+-----------------------
 Reporter:  rmccue                    |       Owner:  dlh
     Type:  feature request           |      Status:  assigned
 Priority:  normal                    |   Milestone:  5.6
Component:  General                   |     Version:
 Severity:  normal                    |  Resolution:
 Keywords:  has-patch has-unit-tests  |     Focuses:  rest-api
--------------------------------------+-----------------------

Comment (by dlh):

 [attachment:"38777.3.diff"] adds support for multiple error data, as
 discussed above and in Slack. It also renames the new methods as suggested
 in comment:20.

 @TimothyBlynJacobs I made one deviation from our last discussion, but I'm
 happy to reconsider it. It seemed to me as I was working on the patch that
 it would be a little more straightforward for the new property to be just
 a record of all the error data added over time, rather than shifting
 messages from one property to another, which also simplifies
 `get_all_error_data()`. Let me know what you think!

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


More information about the wp-trac mailing list