[FOLLOWUP] Fix call to not existing function 42/45942/3
authorAnja Leichsenring <aleichsenring@ab-softlab.de>
Fri, 15 Jan 2016 13:52:07 +0000 (14:52 +0100)
committerAndreas Fernandez <typo3@scripting-base.de>
Fri, 15 Jan 2016 14:32:54 +0000 (15:32 +0100)
StringUtility::beginsWith() does not exist in TYPO3 6.2.
Replace the usage with GeneralUtility::isFirstPartOfStr().

Resolves: #72734
Related: #72648
Releases: 6.2
Change-Id: I473dac2c7c9d87eb5774da390cca271e49f9271f
Reviewed-on: https://review.typo3.org/45942
Reviewed-by: Wouter Wolters <typo3@wouterwolters.nl>
Reviewed-by: Morton Jonuschat <m.jonuschat@mojocode.de>
Tested-by: Morton Jonuschat <m.jonuschat@mojocode.de>
Reviewed-by: Andreas Fernandez <typo3@scripting-base.de>
Tested-by: Andreas Fernandez <typo3@scripting-base.de>
typo3/sysext/core/Classes/Resource/ResourceCompressor.php

index 839c6e7..1c0d9e4 100644 (file)
@@ -16,7 +16,6 @@ namespace TYPO3\CMS\Core\Resource;
 
 use TYPO3\CMS\Core\Utility\PathUtility;
 use TYPO3\CMS\Core\Utility\GeneralUtility;
-use TYPO3\CMS\Core\Utility\StringUtility;
 
 /**
  * Compressor
@@ -323,7 +322,7 @@ class ResourceCompressor {
                        foreach ($filesToInclude as $filename) {
                                $contents = GeneralUtility::getUrl(GeneralUtility::resolveBackPath($this->rootPath . $filename));
                                // remove any UTF-8 byte order mark (BOM) from files
-                               if (StringUtility::beginsWith($contents, "\xEF\xBB\xBF")) {
+                               if (GeneralUtility::isFirstPartOfStr($contents, "\xEF\xBB\xBF")) {
                                        $contents = substr($contents, 3);
                                }
                                // only fix paths if files aren't already in typo3temp (already processed)