From e9ff8cfde43a831d842710315f8eed9951e6e9bf Mon Sep 17 00:00:00 2001 From: Philipp Lorenz Date: Tue, 19 Nov 2019 16:11:18 +0100 Subject: [PATCH 1/2] Fix an error with PCRE 8.32 --- src/BackportedTranslator.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/BackportedTranslator.php b/src/BackportedTranslator.php index 0582db8..e2b3000 100644 --- a/src/BackportedTranslator.php +++ b/src/BackportedTranslator.php @@ -125,8 +125,8 @@ public function getLocale() private function getFromGlobals($id) { // Split the ID into chunks allowing escaped dots (\.) and backslashes (\\) - preg_match_all('/(?:\\\\[.\\\\]|[^.])++/s', $id, $matches); - $parts = preg_replace('/\\\\([.\\\\])/s', '$1', $matches[0]); + preg_match_all('/(?:\\\\[\\\\.]|[^.])++/', $id, $matches); + $parts = preg_replace('/\\\\([\\\\.])/', '$1', $matches[0]); $item = &$GLOBALS['TL_LANG']; foreach ($parts as $part) { if (!isset($item[$part])) { From 21d3075f4c2da63a1ee0cf1002a38a246ae92314 Mon Sep 17 00:00:00 2001 From: Philipp Lorenz Date: Fri, 20 Dec 2019 09:54:25 +0100 Subject: [PATCH 2/2] Add author to BackportedTranslator class --- src/BackportedTranslator.php | 1 + 1 file changed, 1 insertion(+) diff --git a/src/BackportedTranslator.php b/src/BackportedTranslator.php index e2b3000..b83350f 100644 --- a/src/BackportedTranslator.php +++ b/src/BackportedTranslator.php @@ -13,6 +13,7 @@ * @package contao-community-alliance/translator * @author Christian Schiffler * @author Sven Baumann + * @author Philipp Lorenz * @copyright 2013-2018 Contao Community Alliance. * @license https://github.com/contao-community-alliance/translator/blob/master/LICENSE LGPL-3.0 * @filesource