I fixed it by changing this code:
function prepare( $query, $args ) {
if ( is_null( $query ) )
return;
to this code:
function prepare( $query = null ) { // ( $query, *$args )
if ( is_null( $query ) )
return;
in wp-includes/wp-db.php
Not saying it will work for everyone, but it did for me. I’m using the Advocate theme.