[wp-trac] [WordPress Trac] #42274: preview_sidebars_widgets unsetting $sidebars_widgets['array_version'] without check

WordPress Trac noreply at wordpress.org
Thu Oct 19 07:40:33 UTC 2017


#42274: preview_sidebars_widgets unsetting $sidebars_widgets['array_version']
without check
--------------------------+-----------------------------
 Reporter:  darrencoutts  |      Owner:
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  Customize     |    Version:  trunk
 Severity:  normal        |   Keywords:
  Focuses:                |
--------------------------+-----------------------------
 preview_sidebars_widgets unsets $sidebars_widgets['array_version'] without
 checking that it is ever set in the first place.

 Granted that it should be, however if a developer wants to remove all
 widgets from their site, it is possible that they will clear them from a
 database, a database may be corrupted, or a plugin/theme sets this option
 by mistake.

 Suggest that this should have a conditional check to ensure that
 $sidebars_widgets['array_version'] is actually set and also ensure that
 this function always returns an array, even if the database has been
 emptied.

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


More information about the wp-trac mailing list