Hi,
I am having a similar problem with a website and I thought I might post about it here in case anyone might have the same problem at some point.
I had by accident put some text/code that I did not mean to into one of my text widgets. The next thing I know the website gives me the following error...
Warning: array_keys() [function.array-keys]: The first argument should be an array in MYWEBSITEURL/wp-includes/widgets.php on line 676
Warning: Invalid argument supplied for foreach() in MYWEBSITEURL/wp-includes/widgets.php on line 676
Warning: Cannot modify header information - headers already sent by (output started at MYWEBSITEURL/wp-includes/widgets.php:676) in MYWEBSITEURL/wp-includes/pluggable.php on line 694
And the error is the only thing that was showing on my MYSITE/wp-admin admin login page, thus locking me out of the admin panel.
Now in the case of a broken plugin the solution could have been simple. delete the plugin's folder from plugins in my wordpress installation's files. done.
But what do you do when a widget breaks your site?
This problem seems to be rather rare. I could not find other mentions of it.
I found this thread when googling for "removing widget data from database wordpress"
I had already figured out the answer MichaelH gave but was having trouble figuring out what widget data wordpress stores/doesn't store in the database because I did not find the data I thought was breaking our website in the table&column wp_options / widget_text
I even tried emptying and restoring (from a backup copy) the entire wp_options table from the database hoping that that would solve the problem. But it didn't :-(
Right now I am at a lost. Any ideas?
I will be making backups of the entire current site (core files and database).
I might do a complete restore from an old backup. I need to make sure I don't lose any post/page data.
*frustration*
but I still love you wordpress!