[wp-trac] [WordPress Trac] #57674: unregister_setting() raises a PHP warning on unknown settings

WordPress Trac noreply at wordpress.org
Wed Aug 9 00:51:24 UTC 2023


#57674: unregister_setting() raises a PHP warning on unknown settings
--------------------------------------------+------------------------------
 Reporter:  xknown                          |       Owner:  (none)
     Type:  defect (bug)                    |      Status:  new
 Priority:  normal                          |   Milestone:  6.4
Component:  Options, Meta APIs              |     Version:
 Severity:  normal                          |  Resolution:
 Keywords:  php81 has-patch has-unit-tests  |     Focuses:  php-
                                            |  compatibility
--------------------------------------------+------------------------------
Changes (by SergeyBiryukov):

 * milestone:  Awaiting Review => 6.4


Comment:

 Good catch, we already check if `$wp_registered_settings[ $option_name ]`
 is set there, so I think it makes sense to do the same for
 `$new_allowed_options[ $option_group ]`.

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


More information about the wp-trac mailing list