mirror of
https://github.com/yiisoft/yii2.git
synced 2025-08-13 22:06:51 +08:00
Regex fix
This commit is contained in:
@ -411,7 +411,7 @@ abstract class BaseMigrateController extends Controller
|
||||
*/
|
||||
private function extractNamespaceMigrationVersion($rawVersion)
|
||||
{
|
||||
if (preg_match('/^\\\\?([\w_]+\\\\)+m(\d{6}_?\d{6})(\D.*?)?$/is', $rawVersion, $matches)) {
|
||||
if (preg_match('/^\\\\?([\w_]+\\\\)+m(\d{6}_?\d{6})(\D.*)?$/is', $rawVersion, $matches)) {
|
||||
return trim($rawVersion, '\\');
|
||||
}
|
||||
return false;
|
||||
@ -425,7 +425,7 @@ abstract class BaseMigrateController extends Controller
|
||||
*/
|
||||
private function extractMigrationVersion($rawVersion)
|
||||
{
|
||||
if (preg_match('/^m?(\d{6}_?\d{6})(\D.*?)?$/is', $rawVersion, $matches)) {
|
||||
if (preg_match('/^m?(\d{6}_?\d{6})(\D.*)?$/is', $rawVersion, $matches)) {
|
||||
return 'm' . $matches[1];
|
||||
}
|
||||
return false;
|
||||
|
Reference in New Issue
Block a user