I use godaddy hosting.

if you error code is:
Warning: Invalid argument supplied for foreach() in /home/mymaindomain/public_html/mydomain/wp-includes/widgets.php on line 676

This is due to the text widget not having the right kind of data in it. A lot of people get it after upgrading for some reason.

If you go and edit all your text widgets and then save changes, this should go away. Worst case, manually edit your database, find the widget_text row in wp_options, and remove it. Then put your text widgets back.

I narrowed it down to this line from the newer wp-config.php:

define(’DB_CHARSET’, ‘utf8′);

I use dreamhost, maybe they’re not using utf8? In any case, after removing that line, all was well. I hope this helps someone.

I’ve found my problem :
1) There was a difference between my two database. The first was UTF-8 Unicode (utf8) and latin1_leneral_ci, but the second was UTF-8 Unicode (utf8) and utf8_bin.
2) When I’ve imported the data from the first base to the second the character of the sql file was set to utf8 instead of latin1.

So I did the following :
Set my second database to UTF-8 Unicode (utf8) and latin1_leneral_ci.
Choose latin1 character set during the backup importation on the second base.

If you ve yhe same error take a look on the character paramters of your new database, and you’ll find the solution.

Hope it’ll help somebody.

Luffy.
(WORDPRESS 2.5.1)

Tags: ,