aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCôme Chilliet <come.chilliet@nextcloud.com>2022-12-05 16:40:46 +0100
committerCôme Chilliet (Rebase PR Action) <come-nc@users.noreply.github.com>2022-12-19 09:10:41 +0000
commit7996a12aef25b7ac8bd9a61f7b09f6806cef5ec4 (patch)
tree74a10efc50ae41b512b61f9d127b3456cacd17ba
parenta529aa79d8136ec66db78f1b552940b7e374e12f (diff)
downloadnextcloud-server-7996a12aef25b7ac8bd9a61f7b09f6806cef5ec4.tar.gz
nextcloud-server-7996a12aef25b7ac8bd9a61f7b09f6806cef5ec4.zip
Silence false-positive from psalm in lib/public/Log/functions.php
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
-rw-r--r--build/psalm-baseline.xml6
-rw-r--r--lib/public/Log/functions.php1
2 files changed, 1 insertions, 6 deletions
diff --git a/build/psalm-baseline.xml b/build/psalm-baseline.xml
index e77d3cbee80..b4162099598 100644
--- a/build/psalm-baseline.xml
+++ b/build/psalm-baseline.xml
@@ -1789,12 +1789,6 @@
<code>getAppsNeedingUpgrade</code>
<code>getIncompatibleApps</code>
</InternalMethod>
- <InvalidArgument occurrences="1">
- <code>$restrictions</code>
- </InvalidArgument>
- <RedundantCondition occurrences="1">
- <code>((array)$request-&gt;getParam('appid')) !== ''</code>
- </RedundantCondition>
</file>
<file src="lib/private/Accounts/AccountManager.php">
<InvalidArgument occurrences="1">
diff --git a/lib/public/Log/functions.php b/lib/public/Log/functions.php
index cc6961d8fba..ac043b4d958 100644
--- a/lib/public/Log/functions.php
+++ b/lib/public/Log/functions.php
@@ -49,6 +49,7 @@ use function class_exists;
* @since 24.0.0
*/
function logger(string $appId = null): LoggerInterface {
+ /** @psalm-suppress TypeDoesNotContainNull false-positive, it may contain null if we are logging from initialization */
if (!class_exists(OC::class) || OC::$server === null) {
// If someone calls this log before Nextcloud is initialized, there is
// no logging available. In that case we return a noop implementation