From 037f2c016e20ecad0c6148abcc892eff0244f0be Mon Sep 17 00:00:00 2001 From: bigclick Date: Mon, 21 Nov 2011 13:19:57 +1100 Subject: [PATCH] preg_quote'd $fileName to avoid issues when using a special character in their schema filename --- lib/Cake/Console/Command/SchemaShell.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Cake/Console/Command/SchemaShell.php b/lib/Cake/Console/Command/SchemaShell.php index 8ae460c9521..d8d03dd4467 100644 --- a/lib/Cake/Console/Command/SchemaShell.php +++ b/lib/Cake/Console/Command/SchemaShell.php @@ -170,7 +170,7 @@ public function generate() { $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++; } }