Browse Source

Regex fix

tags/2.0.10
Klimov Paul 8 years ago
parent
commit
239cdcdf8a
  1. 4
      framework/console/controllers/BaseMigrateController.php

4
framework/console/controllers/BaseMigrateController.php

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

Loading…
Cancel
Save