[wp-trac] [WordPress Trac] #36660: WP_Customize_Widgets::preview_sidebars_widgets() can return false

WordPress Trac noreply at wordpress.org
Mon Apr 25 11:35:03 UTC 2016


#36660: WP_Customize_Widgets::preview_sidebars_widgets() can return false
--------------------------+-----------------------
 Reporter:  ocean90       |      Owner:
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  4.5.2
Component:  Customize     |    Version:  4.5
 Severity:  normal        |   Keywords:  has-patch
  Focuses:                |
--------------------------+-----------------------
 Seeing this PHP notice on dotorg:

 {{{
 ​E_WARNING: /wp-includes/class-wp-customize-widgets.php:385 -
 array_merge(): Argument #3 is not an array
 array_merge(): Argument #3 is not an array
 Timestamp: Mon, 25 Apr 2016 08:52:29 +0000 (1461574349)
 File: /wp-includes/class-wp-customize-widgets.php
 Line: 385
 }}}

 This seems to be caused by [37166] where the `sidebars_widgets` callback
 was moved before the `wp_get_sidebars_widgets()` call.
 `WP_Customize_Widgets::preview_sidebars_widgets()` is using `get_option(
 'sidebars_widgets' )` without defining a default value so it falls back to
 `false` in case the site has no widgets.

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


More information about the wp-trac mailing list