From 7f3d7e40177d13ba870b449691daa3c8ebe8e921 Mon Sep 17 00:00:00 2001 From: onli Date: Mon, 15 Mar 2021 22:43:54 +0100 Subject: [PATCH] php8 compat: Don't redefine SQL_CHARSET_INIT --- include/db/mysqli.inc.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/db/mysqli.inc.php b/include/db/mysqli.inc.php index 61769534..5dacaa0b 100644 --- a/include/db/mysqli.inc.php +++ b/include/db/mysqli.inc.php @@ -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; }