I figured out what caused this error for me. My blog was working fine, but my local copy was getting the array_keys() error. It turns out it was due to an issue I’ve run into many times before while exporting a database from phpMyAdmin.
For some reason, phpMyAdmin inserts garbage after EVERY LINK in your database content. So if you have a database row with <a href="mylink"> in the data, it will end up looking something like <a href="mylink?phpMyAdmin=hxLEzQ1rOQcEE5fSSzkpIuPI8E7">. Obviously, this causes all kinds of issues.
The only way I’ve found to stop this behavior is to NOT check “save as file” when exporting your database. Just click “Go” and let the dump print to screen. Then copy/paste it into a text file and import that into your local (or wherever) database.