From 8b8f693d00ebbf78066467497b8866c751e6760f Mon Sep 17 00:00:00 2001 From: Marc Alexander Date: Sat, 22 Oct 2016 19:19:36 +0200 Subject: [ticket/14831] Make sure migrations always start with backslash The migration system expects every migration to start with a backslash. If depends on definitions do not supply that leading backslash, we should make sure it's added manually before calling the depends on migration. PHPBB3-14831 --- phpBB/phpbb/db/migrator.php | 3 +++ 1 file changed, 3 insertions(+) (limited to 'phpBB/phpbb/db/migrator.php') diff --git a/phpBB/phpbb/db/migrator.php b/phpBB/phpbb/db/migrator.php index 4c4c0a8672..1f5498c878 100644 --- a/phpBB/phpbb/db/migrator.php +++ b/phpBB/phpbb/db/migrator.php @@ -264,6 +264,9 @@ class migrator foreach ($state['migration_depends_on'] as $depend) { + // Make sure migration starts with backslash + $depend = $depend[0] == '\\' ? $depend : '\\' . $depend; + if ($this->unfulfillable($depend) !== false) { throw new \phpbb\db\migration\exception('MIGRATION_NOT_FULFILLABLE', $name, $depend); -- cgit v1.2.1