php8 compat: Don't redefine SQL_CHARSET_INIT

This commit is contained in:
onli 2021-03-15 22:43:54 +01:00
parent 471292ac1a
commit 7f3d7e4017

View File

@ -250,7 +250,7 @@ function serendipity_db_reconnect() {
$use_charset = '';
if (isset($serendipity['dbCharset']) && !empty($serendipity['dbCharset'])) {
$use_charset = $serendipity['dbCharset'];
@define('SQL_CHARSET_INIT', true);
if (!defined('SQL_CHARSET_INIT')) { define('SQL_CHARSET_INIT', true); }
} elseif (defined('SQL_CHARSET') && $serendipity['dbNames'] && !defined('SQL_CHARSET_INIT')) {
$use_charset = SQL_CHARSET;
}