Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

php 7.4 compatibility #689

Open
wants to merge 1 commit into
base: development
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Classes/Configuration/ConfigurationReader.php
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ protected function getConfigurationKeyByDomainDecode($configurationKey) {
$globalConfig = &$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['realurl'];
foreach ($globalConfig['_DOMAINS']['decode'] as $domainName => $configuration) {
$checkThisConfiguration = false;
if ($domainName{0} == '/') {
if ($domainName[0] == '/') {
// Regular expression, match only main host name
if (@preg_match($domainName, $this->hostName)) {
$checkThisConfiguration = true;
Expand Down
6 changes: 3 additions & 3 deletions Classes/Encoder/UrlEncoder.php
Original file line number Diff line number Diff line change
Expand Up @@ -162,10 +162,10 @@ public function postProcessEncodedUrl(array &$parameters, ContentObjectRenderer
if (preg_match('/^https?:\/\/[^\/]+\//', $url)) {
$url = preg_replace('/^https?:\/\/[^\/]+(\/.*)$/', '\1', $url);
}
if (self::$urlPrepend{strlen(self::$urlPrepend) - 1} === '/' && $url && $url{0} === '/') {
if (self::$urlPrepend[strlen(self::$urlPrepend) - 1] === '/' && $url && $url[0] === '/') {
$url = substr($url, 1);
}
if (self::$urlPrepend{strlen(self::$urlPrepend) - 1} !== '/' && ($url === '' || $url{0} !== '/')) {
if (self::$urlPrepend[strlen(self::$urlPrepend) - 1] !== '/' && ($url === '' || $url[0] !== '/')) {
$url = '/' . $url;
}
$url = self::$urlPrepend . $url;
Expand Down Expand Up @@ -1211,7 +1211,7 @@ protected function handleFileNameUsingGetVars() {

if ($useThisConfiguration) {

if ($fileName{0} === '.') {
if ($fileName[0] === '.') {
if ($this->encodedUrl === '') {
$this->encodedUrl = 'index';
}
Expand Down