[wp-trac] [WordPress Trac] #38930: Warning Raised when checking option exists

WordPress Trac noreply at wordpress.org
Thu Nov 24 12:51:45 UTC 2016


#38930: Warning Raised when checking option exists
--------------------------------+-----------------------------
 Reporter:  lucasstark          |      Owner:
     Type:  defect (bug)        |     Status:  new
 Priority:  normal              |  Milestone:  Awaiting Review
Component:  Options, Meta APIs  |    Version:  trunk
 Severity:  normal              |   Keywords:
  Focuses:                      |
--------------------------------+-----------------------------
 A warning will be raised inside of option.php, check_default_option when
 the following code is called on line 420.

 {{{#!php
 <?php
 // Make sure the option doesn't already exist. We can check the
 'notoptions' cache before we ask for a db query
         $notoptions = wp_cache_get( 'notoptions', 'options' );
         if ( !is_array( $notoptions ) || !isset( $notoptions[$option] ) )
                 /** This filter is documented in wp-includes/option.php */
                 if ( apply_filters( 'default_option_' . $option, false,
 $option ) !== get_option( $option ) )
                         return false;
 }}}

 The default_option filter expects three arguments, only two are passed
 here.

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


More information about the wp-trac mailing list