If your encountering a warning in WordPress stating Warning: array_keys() [function.array-keys]: The first argument should be an array in /home/yourhome/public_html/yoursite/wp-includes/widgets.php on line 1044, your not alone. This error is fairly common amongst many WordPress users just after upgrading, moving or reinstalling WordPress.
I have personally encountered this error immediately after moving a clients WordPress installation from a subdirectory to root (and uploading the new database). It appears that somehow a dynamic sidebar widget was causing the problem. In the following simple solution, I will show you how I fixed the issue:
Warning: array_keys() [function.array-keys]: The first argument should be an array in /home/yourhome/public_html/yoursite/wp-includes/widgets.php on line 1044
How I fixed the Warning: array_keys() [function.array-keys]: Warning
- Login to your WordPress Admin section
- Navigate to Appearance > Widgets
- Remove any Widgets that are listed under Current Widgets and click Save Changes
- Visit your site to see if the error is gone
- Re-enable your Sidebar Widgets one by one and ensure that the error is still gone
If all goes well, this warning should be history! ;)