Add extra backslashes and ungreedy modifier

This commit is contained in:
Robbie Averill 2017-01-11 14:49:09 +13:00
parent 36ae153995
commit e4f67f6e2c

View File

@ -254,7 +254,7 @@ class SSViewer implements Flushable
$templates[] = ['type' => 'Includes', $template];
// If the class is "PageController" (PSR-2 compatibility) or "Page_Controller" (legacy), look for Page.ss
if (preg_match('/^(?<name>.+[^\\])_?Controller$/i', $class, $matches)) {
if (preg_match('/^(?<name>.+[^\\\\])_?Controller$/iU', $class, $matches)) {
$templates[] = $matches['name'] . $suffix;
}