Skip to content

Commit

Permalink
foreach matching Regexp was too greedy
Browse files Browse the repository at this point in the history
  • Loading branch information
kolber committed Sep 15, 2009
1 parent f6b3a33 commit 076aae2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/stacey.inc.php
Expand Up @@ -487,7 +487,7 @@ function check_thumb($dir, $file) {

function parse($file) {
$file = file_get_contents($file);
preg_match('/([\S\s]*)foreach[\S\s]*:([\S\s]*)endforeach;([\S\s]*)/', $file, $matches);
preg_match('/([\S\s]*)foreach[\S\s]*?:([\S\s]*)endforeach;([\S\s]*)/', $file, $matches);
return array($matches[1], $matches[2], $matches[3]);
}

Expand Down

0 comments on commit 076aae2

Please sign in to comment.