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

WordPress Trac noreply at wordpress.org
Thu Nov 24 19:49:44 UTC 2016


#38930: Warning Raised when checking option exists
--------------------------------+--------------------
 Reporter:  lucasstark          |       Owner:
     Type:  defect (bug)        |      Status:  new
 Priority:  normal              |   Milestone:  4.7
Component:  Options, Meta APIs  |     Version:  trunk
 Severity:  normal              |  Resolution:
 Keywords:  needs-testing       |     Focuses:
--------------------------------+--------------------

Comment (by joehoyle):

 Added a patch to pass the 3rd arg to the filter. This arg is "Was the
 default value passed by the caller" which is used to choose if the
 `register_setting` default should override the the `false` default. In
 this case, like `update_option`, it should.

 I added a unit test for this rather specific case where `alloptions` is
 not loaded, which before the patch will fail from a notice.

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


More information about the wp-trac mailing list