From 6fe062f91cdc203cd28722924351f5bc922db121 Mon Sep 17 00:00:00 2001 From: Brian Henry Date: Fri, 6 Oct 2023 15:56:16 -0700 Subject: [PATCH] Allow longer database names --- src/WordPress/Database/MysqlDatabase.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/WordPress/Database/MysqlDatabase.php b/src/WordPress/Database/MysqlDatabase.php index c330b1955..c3d8b8c6f 100644 --- a/src/WordPress/Database/MysqlDatabase.php +++ b/src/WordPress/Database/MysqlDatabase.php @@ -30,7 +30,7 @@ public function __construct( private string $dbHost, private string $tablePrefix = 'wp_' ) { - if (!preg_match('/^[a-zA-Z][\w_]{0,23}$/', $dbName) || str_starts_with('ii', $dbName)) { + if (!preg_match('/^[a-zA-Z][\w_]{0,64}$/', $dbName) || str_starts_with('ii', $dbName)) { throw new DbException( "Invalid database name: $dbName", DbException::INVALID_DB_NAME