diff --git a/lib/dbl.php b/lib/dbl.php index 75b9fca44..93dd8a270 100644 --- a/lib/dbl.php +++ b/lib/dbl.php @@ -835,6 +835,13 @@ static function shutdown() { self::$query_log = false; } + /** @param ?\mysqli $dblink + * @return string */ + static function utf8_charset($dblink = null) { + $dblink = $dblink ?? self::$default_dblink; + return $dblink->server_version >= 50503 ? "utf8mb4" : "utf8"; + } + /** @param \mysqli|string $dblink * @param ?string $qstr * @return string */ @@ -870,13 +877,6 @@ static function convert_utf8($dblink, $qstr = null) { $utf8 = $dblink->server_version >= 50503 ? "utf8mb4" : "utf8"; return "convert($qstr using $utf8)"; } - - /** @param ?\mysqli $dblink - * @return string */ - static function utf8_charset($dblink = null) { - $dblink = $dblink ?? self::$default_dblink; - return $dblink->server_version >= 50503 ? "utf8mb4" : "utf8"; - } } // quoting for SQL