I’m having the same issue! I’m trying to run this locally using IIS with PHP Version 5.1.2. I’ve tracked it back to this
global $wpdb; on line 913 of functions.php.
As for the fix I seem to be bashing my head against a brick wall?
Any help on this would be much appreciated!