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

WordPress Trac noreply at wordpress.org
Thu Nov 17 22:12:38 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:  6.1.1
 Severity:  minor               |   Keywords:
  Focuses:  multisite           |
--------------------------------+-----------------------------
 The function is_site_meta_supported on line 6249 retrieves the value from
 the database without any type correction.

 The value saved enters as integer from update_network_option function and
 is retrieved as a string containing the value "0" or "1" so the if false
 in line 6250 doesn't work.

 I'f for some reason the table was not created at multisite install and
 this functions runs, the function will start to retrieve false every time.

 The fix for it is just add a type adjust in line 6249 to set the
 $supported as a bool.

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


More information about the wp-trac mailing list