From 653fa74a503adb305e0d4b2d4db79650dfa44fc9 Mon Sep 17 00:00:00 2001 From: There Is No TIme <37583483+thereisnotime@users.noreply.github.com> Date: Tue, 14 Apr 2026 17:41:28 +0300 Subject: [PATCH] fix(UserConfig): cast getTypedValue() result to string in getValueBool() PHP 8.4 made passing non-strings to strtolower() a fatal TypeError. getTypedValue() can return a non-string when stored value type metadata doesn't align with ValueType::BOOL (e.g. user_ldap isDeleted preference). The (string) cast ensures strtolower() always receives a valid string. Fixes #59629 --- lib/private/Config/UserConfig.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/private/Config/UserConfig.php b/lib/private/Config/UserConfig.php index 5a5488e34187e..e8bfebadf0259 100644 --- a/lib/private/Config/UserConfig.php +++ b/lib/private/Config/UserConfig.php @@ -685,7 +685,7 @@ public function getValueBool( bool $default = false, bool $lazy = false, ): bool { - $b = strtolower($this->getTypedValue($userId, $app, $key, $default ? 'true' : 'false', $lazy, ValueType::BOOL)); + $b = strtolower((string)$this->getTypedValue($userId, $app, $key, $default ? 'true' : 'false', $lazy, ValueType::BOOL)); return in_array($b, ['1', 'true', 'yes', 'on']); }