[HyperDB] init_charset() bug for < 3.0
Gabriel Koen
gabriel.koen at gmail.com
Fri Aug 20 00:39:34 UTC 2010
Grabbed the latest version of HyperDB, plopped it into a dev install of
2.9.2 and promptly got an error. :) Here's the fix:
/**
* Sets $this->charset and $this->collate
*/
function init_charset() {
if ( *function_exists('is_multisite') &&* is_multisite() ) {
$this->charset = 'utf8';
if ( defined( 'DB_COLLATE' ) && DB_COLLATE )
$this->collate = DB_COLLATE;
else
$this->collate = 'utf8_general_ci';
} elseif ( defined( 'DB_COLLATE' ) ) {
$this->collate = DB_COLLATE;
}
if ( defined( 'DB_CHARSET' ) )
$this->charset = DB_CHARSET;
}
Hope that helps!
Gabriel
More information about the HyperDB
mailing list