Object of class mysqli could not be converted to string on line 1033
Created by: SeBsZ
I immediately got a fatal error on line 1033:
wp_die( $dbh . ' ' . $charset . ' ' . $collate );
It's trying to convert $dbh into a string, which it can't because $dbh is an object of type mysqli.
I didn't have a collate set, so that's why this line is being executed, but I still thought I would let you know.
On a sidenote, why do I need to set a collation in wp-config? HyperDB or Wordpress don't need it set, in fact, this code doesn't do anything with the $collate variable as it is skipped on line 1041. If, in the case of no mysqli it does get to the final part of the else statement (on line 1046) it still has a check to see if $collate is empty or not.
So I'm suggesting a change for line 1032 to read just if ( empty( $charset ) ) {
Or did I forget about something?