[wp-trac] [WordPress Trac] #21989: update_option() calls sanitize_option() twice when option does not exist

WordPress Trac noreply at wordpress.org
Sat Nov 26 23:00:48 UTC 2022


#21989: update_option() calls sanitize_option() twice when option does not exist
-------------------------------------------------+-------------------------
 Reporter:  MikeSchinkel                         |       Owner:  (none)
     Type:  defect (bug)                         |      Status:  new
 Priority:  normal                               |   Milestone:  Future
                                                 |  Release
Component:  Options, Meta APIs                   |     Version:
 Severity:  normal                               |  Resolution:
 Keywords:  dev-feedback has-patch needs-        |     Focuses:
  testing                                        |  performance
-------------------------------------------------+-------------------------

Comment (by Andy Schmidt):

 Replying to [comment:32 costdev]:

 > Curious, in `add_option()`, what if we wrap
 [https://github.com/WordPress/wordpress-develop/blob/6.1/src/wp-
 includes/option.php#L638 this line] with a check on `did_filter` for the
 option?

 Like this proposal!

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


More information about the wp-trac mailing list