[wp-trac] Re: [WordPress Trac] #6532: Warning: The first argument should be an array in /www/lu22radiotandil.com.ar/htdocs/wp-includes/widgets.php on line 654

WordPress Trac wp-trac at lists.automattic.com
Sat Apr 5 14:11:31 GMT 2008


#6532: Warning: The first argument should be an array in
/www/lu22radiotandil.com.ar/htdocs/wp-includes/widgets.php on line 654
-----------------------+----------------------------------------------------
 Reporter:  tandilboy  |        Owner:  anonymous
     Type:  defect     |       Status:  new      
 Priority:  high       |    Milestone:  2.5.1    
Component:  General    |      Version:  2.5      
 Severity:  major      |   Resolution:           
 Keywords:             |  
-----------------------+----------------------------------------------------
Comment (by Denis-de-Bernardy):

 Just a guess... in your theme, insert this code somewhere to see the
 output:

 var_dump(get_option('widget_text'));

 if this outputs a weird looking string with braces and semicolons all
 over, instead of a nice array, this means your option's value is corrupt.

 assuming so... I've seen this happen a bunch of time on my own customers'
 blogs, not to mention my own.

 open phpmyadmin, and run:

 delete from wp_options where option_name = 'widget_text';

 this will delete the text widgets and let you recreate them as
 appropriate.

 while fixing customer sites, I've found that the true underlying issue was
 that, for some reason, WP's db charset and db collation settings that do
 not play well with serialize and unserialize.

 this brings me to the second fix in the event it reoccurs later on. edit
 the wp-config.php file, and to remove the two defines for db charsets and
 db collation. then, delete the widget text option again, and you should be
 fine in the future.

 anyway, if the above tip fixes your site, change this ticket's title to:

 db collation and db charset break serialize and unserialize on some sites

 also provide sample text and the original db collation and charset
 settings, and the contents of your phpinfo so the devs can try to
 reproduce. it would be nice if it no longer occurred. :)

 D.

-- 
Ticket URL: <http://trac.wordpress.org/ticket/6532#comment:5>
WordPress Trac <http://trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list