mirror of
https://github.com/silverstripe/silverstripe-userforms.git
synced 2024-10-22 17:05:42 +02:00
Merge pull request #1092 from webbuilders-group/fix-templates-regex-windows
BUGFIX: Fixed issue causing the regex on windows to throw an error
This commit is contained in:
commit
22f45d069a
@ -542,7 +542,7 @@ class EmailRecipient extends DataObject
|
|||||||
$templatePath = substr($absoluteFilename, strlen($prefixToStrip) + 1);
|
$templatePath = substr($absoluteFilename, strlen($prefixToStrip) + 1);
|
||||||
|
|
||||||
// Optionally remove "templates/" ("templates\" on Windows respectively) prefixes
|
// Optionally remove "templates/" ("templates\" on Windows respectively) prefixes
|
||||||
if (preg_match('#(?<=templates' . DIRECTORY_SEPARATOR . ').*$#', $templatePath, $matches)) {
|
if (preg_match('#(?<=templates' . preg_quote(DIRECTORY_SEPARATOR, '#') . ').*$#', $templatePath, $matches)) {
|
||||||
$templatePath = $matches[0];
|
$templatePath = $matches[0];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user