Index: typo3_src/typo3/sysext/core/Classes/TypoScript/ExtendedTemplateService.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- typo3_src/typo3/sysext/core/Classes/TypoScript/ExtendedTemplateService.php (revision f417d291268f6cb3e50e08b12650b4ffb97d62bf)
+++ typo3_src/typo3/sysext/core/Classes/TypoScript/ExtendedTemplateService.php (revision )
@@ -229,7 +229,7 @@
$this->getFileName_backPath = PATH_site;
foreach ($setupArray as $key => $val) {
// We don't want 'TSConstantEditor' in the flattend setup.
- if ($prefix || substr($key, 0, 16) != 'TSConstantEditor') {
+ if ($prefix || strpos($key, 'TSConstantEditor') !== 0) {
if (is_array($val)) {
$this->flattenSetup($val, $prefix . $key, $key == 'file.');
} elseif ($resourceFlag && $this->resourceCheck) {
@@ -415,7 +415,7 @@
$a++;
$depth = $depth_in . $key;
// This excludes all constants starting with '_' from being shown.
- if ($this->bType != 'const' || substr($depth, 0, 1) != '_') {
+ if ($this->bType != 'const' || $depth{0} != '_') {
$goto = substr(md5($depth), 0, 6);
$deeper = is_array($arr[$key . '.']) && ($this->tsbrowser_depthKeys[$depth] || $this->ext_expandAllNotes) ? 1 : 0;
$PM = 'join';
@@ -666,7 +666,7 @@
$HTML .= $depthData;
$alttext = '[' . $row['templateID'] . ']';
$alttext .= $row['pid'] ? ' - ' . BackendUtility::getRecordPath($row['pid'], $GLOBALS['SOBE']->perms_clause, 20) : '';
- $icon = substr($row['templateID'], 0, 3) == 'sys' ? \TYPO3\CMS\Backend\Utility\IconUtility::getSpriteIconForRecord('sys_template', $row, array('title' => $alttext)) : \TYPO3\CMS\Backend\Utility\IconUtility::getSpriteIcon('mimetypes-x-content-template-static', array('title' => $alttext));
+ $icon = strpos($row['templateID'], 'sys') === 0 ? \TYPO3\CMS\Backend\Utility\IconUtility::getSpriteIconForRecord('sys_template', $row, array('title' => $alttext)) : \TYPO3\CMS\Backend\Utility\IconUtility::getSpriteIcon('mimetypes-x-content-template-static', array('title' => $alttext));
if (in_array($row['templateID'], $this->clearList_const) || in_array($row['templateID'], $this->clearList_setup)) {
$urlParameters = array(
'id' => $GLOBALS['SOBE']->id,
@@ -772,7 +772,7 @@
public function ext_fixed_lgd($string, $chars) {
if ($chars >= 4) {
if (strlen($string) > $chars) {
- if (strlen($string) > 24 && substr($string, 0, 12) == '##' . $this->Cmarker . '_B##') {
+ if (strlen($string) > 24 && strpos($string, '##') === 0 . $this->Cmarker . '_B##') {
return '##' . $this->Cmarker . '_B##' . GeneralUtility::fixed_lgd_cs(substr($string, 12, -12), ($chars - 3)) . '##' . $this->Cmarker . '_E##';
} else {
return GeneralUtility::fixed_lgd_cs($string, $chars - 3);
@@ -1013,7 +1013,7 @@
$retArr['paramstr'] = $p;
switch ($retArr['type']) {
case 'int':
- if (substr($retArr['paramstr'], 0, 1) == '-') {
+ if ($retArr['paramstr']{0} == '-') {
$retArr['params'] = GeneralUtility::intExplode('-', substr($retArr['paramstr'], 1));
$retArr['params'][0] = intval('-' . $retArr['params'][0]);
} else {
@@ -1089,10 +1089,10 @@
* @todo Define visibility
*/
public function ext_getTSCE_config_image($imgConf) {
- if (substr($imgConf, 0, 4) == 'gfx/') {
+ if (strpos($imgConf, 'gfx/') === 0) {
$iFile = $this->ext_localGfxPrefix . $imgConf;
$tFile = $this->ext_localWebGfxPrefix . $imgConf;
- } elseif (substr($imgConf, 0, 4) == 'EXT:') {
+ } elseif (strpos($imgConf, 'EXT:') === 0) {
$iFile = GeneralUtility::getFileAbsFileName($imgConf);
if ($iFile) {
$f = \TYPO3\CMS\Core\Utility\PathUtility::stripPathSitePrefix($iFile);
@@ -1282,7 +1282,7 @@
$checkboxName = 'check[' . $params['name'] . ']';
$checkboxID = $checkboxName;
// Handle type=color specially
- if ($typeDat['type'] == 'color' && substr($params['value'], 0, 2) != '{$') {
+ if ($typeDat['type'] == 'color' && strpos($params['value'], '{$') !== 0) {
$color = '
';
} else {
$color = '';
@@ -1369,13 +1369,13 @@
}
$this->rawP++;
if ($line) {
- if (substr($line, 0, 1) == '[') {
+ if ($line{0} == '[') {
} elseif (strcspn($line, '}#/') != 0) {
$varL = strcspn($line, ' {=<');
$var = substr($line, 0, $varL);
$line = ltrim(substr($line, $varL));
- switch (substr($line, 0, 1)) {
+ switch ($line{0}) {
case '=':
$this->objReg[$pre . $var] = $this->rawP - 1;
break;
@@ -1385,7 +1385,7 @@
break;
}
$this->lastComment = '';
- } elseif (substr($line, 0, 1) == '}') {
+ } elseif ($line{0} == '}') {
$this->lastComment = '';
$this->ext_inBrace--;
if ($this->ext_inBrace < 0) {
@@ -1513,13 +1513,13 @@
if ($var && !GeneralUtility::inList($this->HTMLcolorList, strtolower($var))) {
$var = preg_replace('/[^A-Fa-f0-9]*/', '', $var);
$useFulHex = strlen($var) > 3;
- $col[] = HexDec(substr($var, 0, 1));
- $col[] = HexDec(substr($var, 1, 1));
- $col[] = HexDec(substr($var, 2, 1));
+ $col[] = HexDec($var{0});
+ $col[] = HexDec($var{1});
+ $col[] = HexDec($var{2});
if ($useFulHex) {
- $col[] = HexDec(substr($var, 3, 1));
- $col[] = HexDec(substr($var, 4, 1));
- $col[] = HexDec(substr($var, 5, 1));
+ $col[] = HexDec($var{3});
+ $col[] = HexDec($var{4});
+ $col[] = HexDec($var{5});
}
$var = substr(('0' . DecHex($col[0])), -1) . substr(('0' . DecHex($col[1])), -1) . substr(('0' . DecHex($col[2])), -1);
if ($useFulHex) {
Index: typo3_src/typo3/sysext/extbase/Classes/Object/Container/ClassInfoFactory.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- typo3_src/typo3/sysext/extbase/Classes/Object/Container/ClassInfoFactory.php (revision f417d291268f6cb3e50e08b12650b4ffb97d62bf)
+++ typo3_src/typo3/sysext/extbase/Classes/Object/Container/ClassInfoFactory.php (revision )
@@ -144,7 +144,7 @@
*/
private function isNameOfInjectMethod($methodName) {
if (
- substr($methodName, 0, 6) === 'inject'
+ strpos($methodName, 'inject') === 0
&& $methodName[6] === strtoupper($methodName[6])
&& $methodName !== 'injectSettings'
) {
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 (strpos($controllerObjectName, 'TYPO3\\CMS') === 0) {
$extensionName = '^(?P[^\\\\]+\\\[^\\\\]+)\\\(?P[^\\\\]+)';
} else {
$extensionName = '^(?P[^\\\\]+)\\\\(?P[^\\\\]+)';
Index: typo3_src/typo3/sysext/core/Classes/Package/PackageFactory.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- typo3_src/typo3/sysext/core/Classes/Package/PackageFactory.php (revision f417d291268f6cb3e50e08b12650b4ffb97d62bf)
+++ typo3_src/typo3/sysext/core/Classes/Package/PackageFactory.php (revision )
@@ -88,7 +88,7 @@
if (!is_object($manifest)) {
throw new \TYPO3\Flow\Package\Exception\InvalidPackageManifestException('Invalid composer manifest.', 1348146450);
}
- if (isset($manifest->type) && substr($manifest->type, 0, 10) === 'typo3-cms-') {
+ if (isset($manifest->type) && strpos($manifest->type, 'typo3-cms-') === 0) {
$relativePackagePath = substr($packagePath, strlen($packagesBasePath));
$packageKey = substr($relativePackagePath, strpos($relativePackagePath, '/') + 1, -1);
/**
Index: typo3_src/typo3/sysext/core/Classes/Core/SystemEnvironmentBuilder.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- typo3_src/typo3/sysext/core/Classes/Core/SystemEnvironmentBuilder.php (revision f417d291268f6cb3e50e08b12650b4ffb97d62bf)
+++ typo3_src/typo3/sysext/core/Classes/Core/SystemEnvironmentBuilder.php (revision )
@@ -382,7 +382,7 @@
$isRelativePath = TRUE;
}
} else {
- if (substr($scriptPath, 0, 1) !== '/') {
+ if ($scriptPath{0} !== '/') {
$isRelativePath = TRUE;
}
}
@@ -447,7 +447,7 @@
* @return string Absolute path to document root of installation
*/
static protected function getPathSiteByTypo3ModulePath() {
- if (substr(TYPO3_MOD_PATH, 0, 7) === 'sysext/' || substr(TYPO3_MOD_PATH, 0, 4) === 'ext/' || substr(TYPO3_MOD_PATH, 0, 8) === 'install/') {
+ if (strpos(TYPO3_MOD_PATH, 'sysext/') === 0 || strpos(TYPO3_MOD_PATH, 'ext/') === 0 || strpos(TYPO3_MOD_PATH, 'install/') === 0) {
$pathPartRelativeToDocumentRoot = TYPO3_mainDir . TYPO3_MOD_PATH;
} elseif (substr(TYPO3_MOD_PATH, 0, strlen('../typo3conf/')) === '../typo3conf/') {
$pathPartRelativeToDocumentRoot = substr(TYPO3_MOD_PATH, 3);
Index: typo3_src/typo3/sysext/backend/Classes/Controller/Wizard/TableController.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- typo3_src/typo3/sysext/backend/Classes/Controller/Wizard/TableController.php (revision f417d291268f6cb3e50e08b12650b4ffb97d62bf)
+++ typo3_src/typo3/sysext/backend/Classes/Controller/Wizard/TableController.php (revision )
@@ -465,7 +465,7 @@
$cmd = 'row_down';
}
if ($cmd && MathUtility::canBeInterpretedAsInteger($kk)) {
- if (substr($cmd, 0, 4) == 'row_') {
+ if (strpos($cmd, 'row_') === 0) {
switch ($cmd) {
case 'row_remove':
unset($this->TABLECFG['c'][$kk]);
@@ -502,7 +502,7 @@
}
ksort($this->TABLECFG['c']);
}
- if (substr($cmd, 0, 4) == 'col_') {
+ if (strpos($cmd, 'col_') === 0) {
foreach ($this->TABLECFG['c'] as $cAK => $value) {
switch ($cmd) {
case 'col_remove':
@@ -590,7 +590,7 @@
$vParts = explode($this->tableParsing_delimiter, $v);
// Traverse columns:
for ($a = 0; $a < $cols; $a++) {
- if ($this->tableParsing_quote && substr($vParts[$a], 0, 1) == $this->tableParsing_quote && substr($vParts[$a], -1, 1) == $this->tableParsing_quote) {
+ if ($this->tableParsing_quote && $vParts[$a]{0} == $this->tableParsing_quote && substr($vParts[$a], -1, 1) == $this->tableParsing_quote) {
$vParts[$a] = substr(trim($vParts[$a]), 1, -1);
}
$cfgArr[$k][$a] = $vParts[$a];
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 (strpos($val[0], 'LLL:') === 0) {
$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 (strpos($val[0], 'LLL:') === 0) {
$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 (strpos($val[0], 'LLL:') === 0) {
$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 (strpos($labelArray[0], 'LLL:') === 0) {
$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 (strpos($altLabelArray[0], 'LLL:') === 0) {
$altLabelFieldSelect[$altLabelArray[1]] = $GLOBALS['LANG']->sL($altLabelArray[0]);
} else {
$altLabelFieldSelect[$altLabelArray[1]] = $altLabelArray[0];
Index: typo3_src/typo3/sysext/backend/Classes/Utility/IconUtility.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- typo3_src/typo3/sysext/backend/Classes/Utility/IconUtility.php (revision f417d291268f6cb3e50e08b12650b4ffb97d62bf)
+++ typo3_src/typo3/sysext/backend/Classes/Utility/IconUtility.php (revision )
@@ -187,7 +187,7 @@
$iconfile = 'gfx/i/' . $iconfile;
}
// Setting the absolute path where the icon should be found as a file:
- if (substr($iconfile, 0, 3) == '../') {
+ if (strpos($iconfile, '../') === 0) {
$absfile = PATH_site . substr($iconfile, 3);
} else {
$absfile = PATH_typo3 . $iconfile;
Index: typo3_src/typo3/sysext/core/Resources/PHP/TYPO3.Flow/Classes/TYPO3/Flow/Package/Package.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- typo3_src/typo3/sysext/core/Resources/PHP/TYPO3.Flow/Classes/TYPO3/Flow/Package/Package.php (revision f417d291268f6cb3e50e08b12650b4ffb97d62bf)
+++ typo3_src/typo3/sysext/core/Resources/PHP/TYPO3.Flow/Classes/TYPO3/Flow/Package/Package.php (revision )
@@ -108,7 +108,7 @@
if (substr($packagePath, -1, 1) !== '/') {
throw new \TYPO3\Flow\Package\Exception\InvalidPackagePathException(sprintf('The package path "%s" provided for package "%s" has no trailing forward slash.', $packagePath, $packageKey), 1166633720);
}
- if (substr($classesPath, 1, 1) === '/') {
+ if ($classesPath{1} === '/') {
throw new \TYPO3\Flow\Package\Exception\InvalidPackagePathException(sprintf('The package classes path provided for package "%s" has a leading forward slash.', $packageKey), 1334841320);
}
if (!file_exists($packagePath . $manifestPath . 'composer.json')) {
\ No newline at end of file
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 (strpos($iPUrl[1], 'http') === 0) {
$lines[] = '' . htmlspecialchars($iPUrl[0]) . '';
- } elseif (substr($iPUrl[1], 0, 5) == 'FILE:') {
+ } elseif (strpos($iPUrl[1], 'FILE:') === 0) {
$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'
+ && strpos($_SERVER['SERVER_SOFTWARE'], 'Apache') === 0
) {
$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 )
@@ -599,7 +599,7 @@
$matches = array();
if (preg_match_all('/("[^"]*"|\'[^\']*\'|[^\\s"\'\\=]+|\\=)/s', $tag_tmp, $matches) > 0) {
foreach ($matches[1] as $part) {
- $firstChar = substr($part, 0, 1);
+ $firstChar = $part{0};
if ($firstChar == '"' || $firstChar == '\'') {
$metaValue[] = $firstChar;
$value[] = substr($part, 1, -1);
@@ -736,7 +736,7 @@
$tok = substr($tok, $eocPos + 3);
$inComment = FALSE;
$skipTag = TRUE;
- } elseif (substr($tok, 0, 3) == '!--') {
+ } elseif (strpos($tok, '!--') === 0) {
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;
@@ -748,7 +748,7 @@
$tok = substr($tok, $eocPos + 3);
$skipTag = TRUE;
}
- $firstChar = substr($tok, 0, 1);
+ $firstChar = $tok{0};
// It is a tag... (first char is a-z0-9 or /) (fixed 19/01 2004). This also avoids triggering on and
if (!$skipTag && preg_match('/[[:alnum:]\\/]/', $firstChar) == 1) {
$tagEnd = strpos($tok, '>');
@@ -855,7 +855,7 @@
unset($tagAttrib[0][$attr]);
}
if ($params['prefixLocalAnchors']) {
- if (substr($tagAttrib[0][$attr], 0, 1) == '#') {
+ if ($tagAttrib[0][$attr]{0} == '#') {
$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'] && $urlParts['path']{0} != '/') {
// 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 ($srcVal{0} != '/' && $srcVal{0} != '#') {
$urlParts = parse_url($srcVal);
// Only prefix URLs without a scheme
if (!$urlParts['scheme']) {
@@ -1183,7 +1183,7 @@
next($contentParts);
// bypass the first
while (list($k, $tok) = each($contentParts)) {
- $firstChar = substr($tok, 0, 1);
+ $firstChar = $tok{0};
if (trim($firstChar) !== '') {
$subparts = explode('>', $tok, 2);
$tagEnd = strlen($subparts[0]);
@@ -1500,7 +1500,7 @@
// Endtags are just set lowercase right away
if ($endTag) {
$value = strtolower($value);
- } elseif (substr($value, 0, 4) != '