BUGFIX: Fixed issue causing the regex on windows to throw an error due to escaping of the parenthesis caused by DIRECTORY_SEPARATOR

This commit is contained in:
UndefinedOffset 2021-07-19 11:36:03 -03:00
parent acf1c16743
commit 63a1d1deb2
No known key found for this signature in database
GPG Key ID: 59C4EE2B6468B796
1 changed files with 1 additions and 1 deletions

View File

@ -542,7 +542,7 @@ class EmailRecipient extends DataObject
$templatePath = substr($absoluteFilename, strlen($prefixToStrip) + 1);
// 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];
}