Regex fix

This commit is contained in:
Klimov Paul
2016-09-16 11:58:41 +03:00
parent d2ddb389b0
commit 239cdcdf8a

View File

@ -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;