mirror of
https://github.com/flarum/framework.git
synced 2025-04-01 13:25:13 +08:00
Disallow dashes in database prefix (#3089)
As a temporary fix it has been requested to disallow dashes in the database prefix. The installation process fails when the prefix does include a dash. #3022
This commit is contained in:
parent
4146a4c578
commit
a65488000c
@ -87,8 +87,8 @@ class DatabaseConfig implements Arrayable
|
||||
}
|
||||
|
||||
if (! empty($this->prefix)) {
|
||||
if (! preg_match('/^[\pL\pM\pN_-]+$/u', $this->prefix)) {
|
||||
throw new ValidationFailed('The prefix may only contain characters, dashes and underscores.');
|
||||
if (! preg_match('/^[\pL\pM\pN_]+$/u', $this->prefix)) {
|
||||
throw new ValidationFailed('The prefix may only contain characters and underscores.');
|
||||
}
|
||||
|
||||
if (strlen($this->prefix) > 10) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user