Skip to content

Commit

Permalink
preg_quote'd $fileName to avoid issues when using a special character…
Browse files Browse the repository at this point in the history
… in their schema filename
  • Loading branch information
bigclick committed Nov 21, 2011
1 parent 7a68f7f commit 037f2c0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/Cake/Console/Command/SchemaShell.php
Expand Up @@ -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++;
}
}
Expand Down

0 comments on commit 037f2c0

Please sign in to comment.