user_external
user_external copied to clipboard
PHP 8.1 support: trim(): Passing null to parameter #1 ($string) of type string is deprecated at lib/Base.php#69
Log:
trim(): Passing null to parameter #1 ($string) of type string is deprecated at /nextcloud/apps/user_external/lib/Base.php#69
Patch:
--- lib/Base.php
+++ lib/Base.php
@@ -66,7 +66,7 @@
$user = $result->fetch();
$result->closeCursor();
- $displayName = trim($user['displayname'], ' ');
+ $displayName = trim($user['displayname'] ?? '', ' ');
if (!empty($displayName)) {
return $displayName;
} else {