aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/phpbb/db/migrator.php
diff options
context:
space:
mode:
Diffstat (limited to 'phpBB/phpbb/db/migrator.php')
-rw-r--r--phpBB/phpbb/db/migrator.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/phpBB/phpbb/db/migrator.php b/phpBB/phpbb/db/migrator.php
index 30eafcc470..45a333ac94 100644
--- a/phpBB/phpbb/db/migrator.php
+++ b/phpBB/phpbb/db/migrator.php
@@ -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]))
{