[wp-trac] [WordPress Trac] #57323: get_settings_errors() inline docs return should reflect the array of arrays

WordPress Trac noreply at wordpress.org
Tue Dec 13 16:08:21 UTC 2022


#57323: get_settings_errors() inline docs return should reflect the array of arrays
--------------------------------+---------------------
 Reporter:  mcaskill            |       Owner:  (none)
     Type:  defect (bug)        |      Status:  new
 Priority:  normal              |   Milestone:  6.2
Component:  Options, Meta APIs  |     Version:  5.6
 Severity:  normal              |  Resolution:
 Keywords:  has-patch commit    |     Focuses:  docs
--------------------------------+---------------------
Changes (by costdev):

 * keywords:  has-patch => has-patch commit
 * version:  6.1.1 => 5.6
 * milestone:  Awaiting Review => 6.2


Comment:

 Hi @mcaskill, thanks for opening this ticket and well spotted!

 Just a quick note that the `Version` property of tickets refers to the
 version that introduced the issue, which as you noted in the ticket
 description, was 5.6.

 While [48760] changed `@return array` to add more detail, I agree that
 this could be clearer to avoid confusion.

 For others' reference, here's a sample return value of
 `get_settings_errors()`:
 {{{#!php
 array (
   0 =>
   array (
     'setting' => 'new_admin_email',
     'code' => 'invalid_new_admin_email',
     'message' => 'The email address entered did not appear to be a valid
 email address. Please enter a valid email address.',
     'type' => 'error',
   ),
 );
 }}}

 The patch looks good to me. Adding for `commit` consideration.

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


More information about the wp-trac mailing list