[wp-trac] [WordPress Trac] #19945: Bug in ../wp-includes/widgets.php

WordPress Trac wp-trac at lists.automattic.com
Thu Feb 2 08:22:35 UTC 2012


#19945: Bug in ../wp-includes/widgets.php
--------------------------+-----------------------------
 Reporter:  Barti112      |      Owner:  Barti112
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  Widgets       |    Version:  3.3.1
 Severity:  normal        |   Keywords:
--------------------------+-----------------------------
 in this file there are at some places the following code:

 $widget = array_merge($widget, $options);

 it is possible that $options is not an array and i become a php-warning.

 i think better is to check the arrays before you use this function:

 if(is_array($widget) && is_array($options)){
   $widget = array_merge($widget, $options);
 }

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/19945>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list