[wp-trac] [WordPress Trac] #54805: When on the /wp-admin/network/site-settings.php network settings page, calling the update_option() always add the setting

WordPress Trac noreply at wordpress.org
Thu Jan 13 00:03:49 UTC 2022


#54805: When on the /wp-admin/network/site-settings.php network settings page,
calling the update_option() always add the setting
--------------------------------+-----------------------------
 Reporter:  zenithcity          |      Owner:  (none)
     Type:  defect (bug)        |     Status:  new
 Priority:  normal              |  Milestone:  Awaiting Review
Component:  Options, Meta APIs  |    Version:  5.8.3
 Severity:  minor               |   Keywords:  needs-patch
  Focuses:                      |
--------------------------------+-----------------------------
 When on the network settings (/wp-admin/network/site-settings.php), the
 udpate_option() used to update the changed settings always adds the
 settings whenever the form is submitted. So instead of firing the
 "update_option" action hook after the settings are updated, it still fires
 the **add_option** action hook every time!

 Obviously, this should give an error but because there's a bailer when
 adding option using **ON DUPLICATE KEY UPDATE**, no error is shown.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/54805>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list