diff options
author | Richard Steinmetz <richard@steinmetz.cloud> | 2023-03-02 12:28:17 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-03-02 12:28:17 +0100 |
commit | 7a020b1d1a24366a23e506ed55e6dc5a288a776e (patch) | |
tree | 0e92a54f85ffb6a5f5208e1241ff843435120b1c /apps/dav/lib/CalDAV/Schedule/IMipService.php | |
parent | 289fadfd504f0a36836e8c0a082a51e16d3b8da2 (diff) | |
parent | a35b960c7a74c41f24910e3110c7a53a996a70e3 (diff) | |
download | nextcloud-server-7a020b1d1a24366a23e506ed55e6dc5a288a776e.tar.gz nextcloud-server-7a020b1d1a24366a23e506ed55e6dc5a288a776e.zip |
Merge pull request #36935 from nextcloud/fix/noid/imip-plugin-null-hardening
fix(caldav): harden null handling of iMip scheduling method
Diffstat (limited to 'apps/dav/lib/CalDAV/Schedule/IMipService.php')
-rw-r--r-- | apps/dav/lib/CalDAV/Schedule/IMipService.php | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/apps/dav/lib/CalDAV/Schedule/IMipService.php b/apps/dav/lib/CalDAV/Schedule/IMipService.php index 3e8e72bd2e4..50e770e6b40 100644 --- a/apps/dav/lib/CalDAV/Schedule/IMipService.php +++ b/apps/dav/lib/CalDAV/Schedule/IMipService.php @@ -70,11 +70,15 @@ class IMipService { } /** - * @param string $senderName - * @param $default + * @param string|null $senderName + * @param string $default * @return string */ - public function getFrom(string $senderName, $default): string { + public function getFrom(?string $senderName, string $default): string { + if ($senderName === null) { + return $default; + } + return $this->l10n->t('%1$s via %2$s', [$senderName, $default]); } |