mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-30 21:40:43 +02:00
[ticket/14831] Rename migration and replace preg_replace() with simpler methods
PHPBB3-14831
This commit is contained in:
@@ -212,8 +212,8 @@ class migrator
|
||||
// Try falling back to a valid migration name with or without leading backslash
|
||||
if (!isset($this->migration_state[$name]))
|
||||
{
|
||||
$prepended_name = preg_replace('#^(?!\\\)#', '\\\$0', $name);
|
||||
$prefixless_name = preg_replace('#(^\\\)([^\\\].+)#', '$2', $name);
|
||||
$prepended_name = ($name[0] == '\\' ? '' : '\\') . $name;
|
||||
$prefixless_name = $name[0] == '\\' ? substr($name, 1) : $name;
|
||||
|
||||
if (isset($this->migration_state[$prepended_name]))
|
||||
{
|
||||
|
Reference in New Issue
Block a user