[wp-trac] [WordPress Trac] #57139: Value type mismatch on is_site_meta_supported function

WordPress Trac noreply at wordpress.org
Thu Nov 17 22:42:52 UTC 2022


#57139: Value type mismatch on is_site_meta_supported function
--------------------------------+------------------------------
 Reporter:  lucascarvalhopl     |       Owner:  (none)
     Type:  defect (bug)        |      Status:  new
 Priority:  normal              |   Milestone:  Awaiting Review
Component:  Networks and Sites  |     Version:  5.1
 Severity:  minor               |  Resolution:
 Keywords:  reporter-feedback   |     Focuses:  multisite
--------------------------------+------------------------------
Changes (by TimothyBlynJacobs):

 * keywords:   => reporter-feedback
 * version:  6.1.1 => 5.1


Comment:

 Thanks for the ticket and welcome to trac @lucascarvalhopl!

 I believe that's intentional. What the code is trying to do is check if a
 value has not been set at all for the option, in which case the third
 parameter, `$default` is returned instead. This ''will'' pass the strict
 equality check. Then, the option will be written to at which point that
 branch will no longer execute.

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


More information about the wp-trac mailing list