ソースを参照

preg_quote'd $fileName to avoid issues when using a special character in their schema filename

bigclick 14 年 前
コミット
037f2c016e
1 ファイル変更1 行追加1 行削除
  1. 1 1
      lib/Cake/Console/Command/SchemaShell.php

+ 1 - 1
lib/Cake/Console/Command/SchemaShell.php

@@ -170,7 +170,7 @@ class SchemaShell extends Shell {
 			$count = 0;
 			if (!empty($result[1])) {
 				foreach ($result[1] as $file) {
-					if (preg_match('/'.$fileName.'(?:[_\d]*)?\.php$/', $file)) {
+					if (preg_match('/'.preg_quote($fileName).'(?:[_\d]*)?\.php$/', $file)) {
 						$count++;
 					}
 				}