Index: typo3_src/typo3/sysext/core/Classes/Utility/ClassNamingUtility.php IDEA additional info: Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP <+>UTF-8 =================================================================== --- typo3_src/typo3/sysext/core/Classes/Utility/ClassNamingUtility.php (revision f417d291268f6cb3e50e08b12650b4ffb97d62bf) +++ typo3_src/typo3/sysext/core/Classes/Utility/ClassNamingUtility.php (revision ) @@ -96,7 +96,7 @@ $matches = array(); if (strpos($controllerObjectName, '\\') !== FALSE) { - if (substr($controllerObjectName, 0, 9) === 'TYPO3\\CMS') { + if (\TYPO3\CMS\Core\Utility\GeneralUtility::isFirstPartOfStr($controllerObjectName, 'TYPO3\\CMS')) { $extensionName = '^(?P[^\\\\]+\\\[^\\\\]+)\\\(?P[^\\\\]+)'; } else { $extensionName = '^(?P[^\\\\]+)\\\\(?P[^\\\\]+)'; Index: typo3_src/typo3/sysext/core/Classes/Database/QueryView.php IDEA additional info: Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP <+>UTF-8 =================================================================== --- typo3_src/typo3/sysext/core/Classes/Database/QueryView.php (revision f417d291268f6cb3e50e08b12650b4ffb97d62bf) +++ typo3_src/typo3/sysext/core/Classes/Database/QueryView.php (revision ) @@ -780,7 +780,7 @@ } if ($fieldSetup['type'] == 'multiple') { foreach ($fieldSetup['items'] as $key => $val) { - if (substr($val[0], 0, 4) == 'LLL:') { + if (\TYPO3\CMS\Core\Utility\GeneralUtility::isFirstPartOfStr($val[0], 'LLL:')) { $value = $GLOBALS['LANG']->sL($val[0]); } else { $value = $val[0]; @@ -796,7 +796,7 @@ } if ($fieldSetup['type'] == 'binary') { foreach ($fieldSetup['items'] as $Key => $val) { - if (substr($val[0], 0, 4) == 'LLL:') { + if (\TYPO3\CMS\Core\Utility\GeneralUtility::isFirstPartOfStr($val[0], 'LLL:')) { $value = $GLOBALS['LANG']->sL($val[0]); } else { $value = $val[0]; @@ -811,7 +811,7 @@ if ($fieldSetup['type'] == 'relation') { if ($fieldSetup['items']) { foreach ($fieldSetup['items'] as $key => $val) { - if (substr($val[0], 0, 4) == 'LLL:') { + if (\TYPO3\CMS\Core\Utility\GeneralUtility::isFirstPartOfStr($val[0], 'LLL:')) { $value = $GLOBALS['LANG']->sL($val[0]); } else { $value = $val[0]; @@ -869,7 +869,7 @@ $altLabelField = $GLOBALS['TCA'][$from_table]['ctrl']['label_alt']; if ($GLOBALS['TCA'][$from_table]['columns'][$labelField]['config']['items']) { foreach ($GLOBALS['TCA'][$from_table]['columns'][$labelField]['config']['items'] as $labelArray) { - if (substr($labelArray[0], 0, 4) == 'LLL:') { + if (\TYPO3\CMS\Core\Utility\GeneralUtility::isFirstPartOfStr($labelArray[0], 'LLL:')) { $labelFieldSelect[$labelArray[1]] = $GLOBALS['LANG']->sL($labelArray[0]); } else { $labelFieldSelect[$labelArray[1]] = $labelArray[0]; @@ -879,7 +879,7 @@ } if ($GLOBALS['TCA'][$from_table]['columns'][$altLabelField]['config']['items']) { foreach ($GLOBALS['TCA'][$from_table]['columns'][$altLabelField]['config']['items'] as $altLabelArray) { - if (substr($altLabelArray[0], 0, 4) == 'LLL:') { + if (\TYPO3\CMS\Core\Utility\GeneralUtility::isFirstPartOfStr($altLabelArray[0], 'LLL:')) { $altLabelFieldSelect[$altLabelArray[1]] = $GLOBALS['LANG']->sL($altLabelArray[0]); } else { $altLabelFieldSelect[$altLabelArray[1]] = $altLabelArray[0]; Index: typo3_src/typo3/sysext/cshmanual/Classes/Controller/HelpModuleController.php IDEA additional info: Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP <+>UTF-8 =================================================================== --- typo3_src/typo3/sysext/cshmanual/Classes/Controller/HelpModuleController.php (revision f417d291268f6cb3e50e08b12650b4ffb97d62bf) +++ typo3_src/typo3/sysext/cshmanual/Classes/Controller/HelpModuleController.php (revision ) @@ -454,9 +454,9 @@ $iP = explode(':', $val); $iPUrl = \TYPO3\CMS\Core\Utility\GeneralUtility::trimExplode('|', $val); // URL reference: - if (substr($iPUrl[1], 0, 4) == 'http') { + if (\TYPO3\CMS\Core\Utility\GeneralUtility::isFirstPartOfStr($iPUrl[1], 'http')) { $lines[] = '' . htmlspecialchars($iPUrl[0]) . ''; - } elseif (substr($iPUrl[1], 0, 5) == 'FILE:') { + } elseif (\TYPO3\CMS\Core\Utility\GeneralUtility::isFirstPartOfStr($iPUrl[1], 'FILE:')) { $fileName = \TYPO3\CMS\Core\Utility\GeneralUtility::getFileAbsFileName(substr($iPUrl[1], 5), 1, 1); if ($fileName && @is_file($fileName)) { $fileName = '../' . \TYPO3\CMS\Core\Utility\PathUtility::stripPathSitePrefix($fileName); Index: typo3_src/typo3/sysext/install/Classes/SystemEnvironment/Check.php IDEA additional info: Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP <+>UTF-8 =================================================================== --- typo3_src/typo3/sysext/install/Classes/SystemEnvironment/Check.php (revision f417d291268f6cb3e50e08b12650b4ffb97d62bf) +++ typo3_src/typo3/sysext/install/Classes/SystemEnvironment/Check.php (revision ) @@ -801,7 +801,7 @@ protected function checkWindowsApacheThreadStackSize() { if ( $this->isWindowsOs() - && substr($_SERVER['SERVER_SOFTWARE'], 0, 6) === 'Apache' + && \TYPO3\CMS\Core\Utility\GeneralUtility::isFirstPartOfStr($_SERVER['SERVER_SOFTWARE'], 'Apache') ) { $status = new Status\WarningStatus(); $status->setTitle('Windows apache thread stack size'); Index: typo3_src/typo3/sysext/core/Classes/Html/HtmlParser.php IDEA additional info: Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP <+>UTF-8 =================================================================== --- typo3_src/typo3/sysext/core/Classes/Html/HtmlParser.php (revision f417d291268f6cb3e50e08b12650b4ffb97d62bf) +++ typo3_src/typo3/sysext/core/Classes/Html/HtmlParser.php (revision ) @@ -736,7 +736,7 @@ $tok = substr($tok, $eocPos + 3); $inComment = FALSE; $skipTag = TRUE; - } elseif (substr($tok, 0, 3) == '!--') { + } elseif (\TYPO3\CMS\Core\Utility\GeneralUtility::isFirstPartOfStr($tok, '!--')) { if (($eocPos = strpos($tok, '-->')) === FALSE) { // Comment started in this token but it does end in the same token. Set a flag to skip till the end of comment $newContent[$c++] = '<' . $tok; @@ -855,7 +855,7 @@ unset($tagAttrib[0][$attr]); } if ($params['prefixLocalAnchors']) { - if (substr($tagAttrib[0][$attr], 0, 1) == '#') { + if (\TYPO3\CMS\Core\Utility\GeneralUtility::isFirstPartOfStr($tagAttrib[0][$attr], '#')) { $prefix = GeneralUtility::getIndpEnv('TYPO3_REQUEST_URL'); $tagAttrib[0][$attr] = $prefix . $tagAttrib[0][$attr]; if ($params['prefixLocalAnchors'] == 2 && GeneralUtility::isFirstPartOfStr($prefix, GeneralUtility::getIndpEnv('TYPO3_SITE_URL'))) { @@ -865,7 +865,7 @@ } if ($params['prefixRelPathWith']) { $urlParts = parse_url($tagAttrib[0][$attr]); - if (!$urlParts['scheme'] && substr($urlParts['path'], 0, 1) != '/') { + if (!$urlParts['scheme'] && !\TYPO3\CMS\Core\Utility\GeneralUtility::isFirstPartOfStr($urlParts['path'], '/')) { // If it is NOT an absolute URL (by http: or starting "/") $tagAttrib[0][$attr] = $params['prefixRelPathWith'] . $tagAttrib[0][$attr]; } @@ -1103,7 +1103,7 @@ public function prefixRelPath($prefix, $srcVal, $suffix = '') { // Only prefix if it's not an absolute URL or // only a link to a section within the page. - if (substr($srcVal, 0, 1) != '/' && substr($srcVal, 0, 1) != '#') { + if (!\TYPO3\CMS\Core\Utility\GeneralUtility::isFirstPartOfStr($srcVal, '/') && !\TYPO3\CMS\Core\Utility\GeneralUtility::isFirstPartOfStr($srcVal, '#')) { $urlParts = parse_url($srcVal); // Only prefix URLs without a scheme if (!$urlParts['scheme']) { @@ -1500,7 +1500,7 @@ // Endtags are just set lowercase right away if ($endTag) { $value = strtolower($value); - } elseif (substr($value, 0, 4) != '