Skip to content

Commit

Permalink
Allow longer database names
Browse files Browse the repository at this point in the history
  • Loading branch information
BrianHenryIE authored Oct 6, 2023
1 parent aba8b1d commit 6fe062f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/WordPress/Database/MysqlDatabase.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 6fe062f

Please sign in to comment.