Skip to content
Open
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 lib/private/Config/UserConfig.php
Original file line number Diff line number Diff line change
Expand Up @@ -686,7 +686,7 @@
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));

Check failure on line 689 in lib/private/Config/UserConfig.php

View workflow job for this annotation

GitHub Actions / static-code-analysis

RedundantCast

lib/private/Config/UserConfig.php:689:19: RedundantCast: Redundant cast to string (see https://psalm.dev/262)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't get how getTypedValue can return something which is not a string

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Empty string on oracle is null?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See stack trace in linked issue. It is a string. Php would throw if it is not a string due to strict types.

I suspect a faulty PHP build being used on that machine.

return in_array($b, ['1', 'true', 'yes', 'on']);
}

Expand Down
Loading