Skip to content

Commit

Permalink
Add fallback for SC_OPTIONS for case when it is defined in `ext_loc…
Browse files Browse the repository at this point in the history
…alconf.php`
  • Loading branch information
beatrycze-volk committed Jul 11, 2024
1 parent b089b8d commit 24de353
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion Classes/Common/Helper.php
Original file line number Diff line number Diff line change
Expand Up @@ -935,6 +935,11 @@ private static function getEncryptionKey(): ?string
private static function getLocalConfigurationByPath(string $path)
{
$configurationManager = GeneralUtility::makeInstance(ConfigurationManager::class);
return $configurationManager->getLocalConfigurationValueByPath($path);

if (array_key_exists(strtok($path, '/'), $configurationManager->getLocalConfiguration())); {

Check notice on line 939 in Classes/Common/Helper.php

View check run for this annotation

Codacy Production / Codacy Static Code Analysis

Classes/Common/Helper.php#L939

Inline control structures are not allowed
return $configurationManager->getLocalConfigurationValueByPath($path);
}

return ArrayUtility::getValueByPath($GLOBALS['TYPO3_CONF_VARS'], $path);

Check failure on line 943 in Classes/Common/Helper.php

View workflow job for this annotation

GitHub Actions / Static Code Analysis

Unreachable statement - code above always terminates.

Check failure on line 943 in Classes/Common/Helper.php

View check run for this annotation

Codacy Production / Codacy Static Code Analysis

Classes/Common/Helper.php#L943

Direct use of $GLOBALS Superglobal detected.

Check failure on line 943 in Classes/Common/Helper.php

View check run for this annotation

Codacy Production / Codacy Static Code Analysis

Classes/Common/Helper.php#L943

Direct use of $GLOBALS Superglobal detected.
}
}

0 comments on commit 24de353

Please sign in to comment.