mirror of
https://github.com/yiisoft/yii2.git
synced 2025-08-14 22:30:27 +08:00
Regex fix
This commit is contained in:
@ -411,7 +411,7 @@ abstract class BaseMigrateController extends Controller
|
|||||||
*/
|
*/
|
||||||
private function extractNamespaceMigrationVersion($rawVersion)
|
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 trim($rawVersion, '\\');
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
@ -425,7 +425,7 @@ abstract class BaseMigrateController extends Controller
|
|||||||
*/
|
*/
|
||||||
private function extractMigrationVersion($rawVersion)
|
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 'm' . $matches[1];
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
|
Reference in New Issue
Block a user