[wp-trac] [WordPress Trac] #22192: update_option() strict checks can cause false negatives

WordPress Trac noreply at wordpress.org
Wed Oct 11 15:04:22 UTC 2023


#22192: update_option() strict checks can cause false negatives
--------------------------------------------+--------------------------
 Reporter:  nacin                           |       Owner:  mukesh27
     Type:  defect (bug)                    |      Status:  reopened
 Priority:  normal                          |   Milestone:  6.4
Component:  Options, Meta APIs              |     Version:
 Severity:  normal                          |  Resolution:
 Keywords:  has-patch has-unit-tests close  |     Focuses:  performance
--------------------------------------------+--------------------------

Comment (by spacedmonkey):

 Instead of removing filters, could we do something like this.

 {{{#!php
         $alloptions = wp_load_alloptions();
         if ( isset( $alloptions[ $option_name ] ) ) {
             $raw_option = $alloptions[ $option_name ];
         } else{
            ....current code to unhook option filters...
         }

 }}}

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


More information about the wp-trac mailing list