[BUGFIX] PHP warning due to missing preg_quote 45/29145/3
authorPhilipp Bergsmann <p.bergsmann@opendo.at>
Fri, 4 Apr 2014 09:29:13 +0000 (11:29 +0200)
committerStefan Neufeind <typo3.neufeind@speedpartner.de>
Fri, 4 Apr 2014 15:13:24 +0000 (17:13 +0200)
Fixing a missing preg_quote() call in ExtensionManagementUtility,
which causes a PHP warning and a failing preg_match().

Resolves: #55662
Releases: 6.2
Change-Id: Iaf1e21546741ae282016f433bf83f7e5663e3c7b
Reviewed-on: https://review.typo3.org/29145
Reviewed-by: Markus Klein
Tested-by: Markus Klein
Reviewed-by: Pascal Dürsteler
Tested-by: Pascal Dürsteler
Reviewed-by: Stefan Neufeind
Tested-by: Stefan Neufeind
typo3/sysext/core/Classes/Utility/ExtensionManagementUtility.php

index afe796e..cfde262 100644 (file)
@@ -649,7 +649,7 @@ class ExtensionManagementUtility {
                // Remove the field names from the insertionlist.
                $fieldReplacePatterns = array();
                foreach ($listMatches[1] as $fieldName) {
-                       $fieldReplacePatterns[] = '/(?:^|,)\\s*\\b' . $fieldName . '\\b[^,$]*/';
+                       $fieldReplacePatterns[] = '/(?:^|,)\\s*\\b' . preg_quote($fieldName, '/') . '\\b[^,$]*/';
                }
                return preg_replace($fieldReplacePatterns, '', $insertionList);
        }