diff options
author | Côme Chilliet <come.chilliet@nextcloud.com> | 2025-06-24 16:28:58 +0200 |
---|---|---|
committer | Côme Chilliet <come.chilliet@nextcloud.com> | 2025-06-24 16:28:58 +0200 |
commit | e2a0ed080bddf189d9536c220c6ec28a69b4afd0 (patch) | |
tree | e7080592edd42ea77a50643b0ca59a94b1cd8cfe | |
parent | 5f63c89955620709cc1d9312e704f1830019dc66 (diff) | |
download | nextcloud-server-fix/fix-admin-audit-listener.tar.gz nextcloud-server-fix/fix-admin-audit-listener.zip |
fix(admin_audit): Avoid crash when rename event fileid changesfix/fix-admin-audit-listener
This was fixed on master another way, but for stable31 we should still
avoid the crash.
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
-rw-r--r-- | apps/admin_audit/lib/Actions/Files.php | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/apps/admin_audit/lib/Actions/Files.php b/apps/admin_audit/lib/Actions/Files.php index f07ed254272..bcabba3cfb3 100644 --- a/apps/admin_audit/lib/Actions/Files.php +++ b/apps/admin_audit/lib/Actions/Files.php @@ -73,7 +73,7 @@ class Files extends Action { public function afterRename(NodeRenamedEvent $event): void { try { $target = $event->getTarget(); - $originalSource = $this->renamedNodes[$target->getId()]; + $originalSource = $this->renamedNodes[$target->getId()] ?? $event->getSource(); $params = [ 'newid' => $target->getId(), 'oldpath' => $originalSource->getPath(), |