[wp-trac] [WordPress Trac] #7222: array_merge() error in
wp-includes/widgets.php
WordPress Trac
wp-trac at lists.automattic.com
Wed Jul 2 07:28:00 GMT 2008
#7222: array_merge() error in wp-includes/widgets.php
---------------------+------------------------------------------------------
Reporter: fyre | Owner: anonymous
Type: defect | Status: new
Priority: normal | Milestone:
Component: General | Version: 2.5.1
Severity: normal | Keywords: array_merge, widgets,php
---------------------+------------------------------------------------------
Certain installations of WordPress 2.5.1 in a php5 environment experience
errors similar to the below:
Warning: array_merge() [function.array-merge]: Argument #2 is not an array
in /path/to/wp-includes/widgets.php on line 60
This often occurs in installations where the server upgraded from php4.x
to php5.x.
This is almost certainly related to a plugin issue, and the first step to
resolve should be to ensure all plugins have been upgraded to their latest
stable releases (check the author homepage if necessary to ensure). If
this does not resolve, the following will:
On the line noted (usually 60), find the code:
$sidebar = array_merge($defaults, $args);
The fix is to change the code to:
$sidebar = array_merge($defaults, (array)$args);
--
Ticket URL: <http://trac.wordpress.org/ticket/7222>
WordPress Trac <http://trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list