Skip to content

Commit

Permalink
Merge pull request #657 from BrianHenryIE/patch-3
Browse files Browse the repository at this point in the history
Allow longer database names
  • Loading branch information
lucatume authored Oct 9, 2023
2 parents 6624c7d + 6fe062f commit 2ffa53a
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 2ffa53a

Please sign in to comment.