aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/private/AppConfig.php1
-rw-r--r--lib/private/Config/ConfigManager.php4
-rw-r--r--lib/private/Config/UserConfig.php1
3 files changed, 4 insertions, 2 deletions
diff --git a/lib/private/AppConfig.php b/lib/private/AppConfig.php
index 4048e32cca1..b6412b410bb 100644
--- a/lib/private/AppConfig.php
+++ b/lib/private/AppConfig.php
@@ -480,6 +480,7 @@ class AppConfig implements IAppConfig {
// in case the key was modified while running matchAndApplyLexiconDefinition() we are
// interested to check options in case a modification of the value is needed
+ // ie inverting value from previous key when using lexicon option RENAME_INVERT_BOOLEAN
if ($origKey !== $key && $type === self::VALUE_BOOL) {
$configManager = Server::get(ConfigManager::class);
$value = ($configManager->convertToBool($value, $this->getLexiconEntry($app, $key))) ? '1' : '0';
diff --git a/lib/private/Config/ConfigManager.php b/lib/private/Config/ConfigManager.php
index 08deb4c84d3..1980269e2ca 100644
--- a/lib/private/Config/ConfigManager.php
+++ b/lib/private/Config/ConfigManager.php
@@ -205,7 +205,7 @@ class ConfigManager {
}
public function convertToInt(string $value): int {
- if ($value !== ((string)((int)$value))) {
+ if (!is_numeric($value) || (float)$value <> (int)$value) {
throw new TypeConflictException('Value is not an integer');
}
@@ -213,7 +213,7 @@ class ConfigManager {
}
public function convertToFloat(string $value): float {
- if ($value !== ((string)((float)$value))) {
+ if (!is_numeric($value)) {
throw new TypeConflictException('Value is not a float');
}
diff --git a/lib/private/Config/UserConfig.php b/lib/private/Config/UserConfig.php
index 59d6439b3bd..7a49a932737 100644
--- a/lib/private/Config/UserConfig.php
+++ b/lib/private/Config/UserConfig.php
@@ -760,6 +760,7 @@ class UserConfig implements IUserConfig {
// in case the key was modified while running matchAndApplyLexiconDefinition() we are
// interested to check options in case a modification of the value is needed
+ // ie inverting value from previous key when using lexicon option RENAME_INVERT_BOOLEAN
if ($origKey !== $key && $type === ValueType::BOOL) {
$configManager = Server::get(ConfigManager::class);
$value = ($configManager->convertToBool($value, $this->getLexiconEntry($app, $key))) ? '1' : '0';