mirror of
https://github.com/nextcloud/server.git
synced 2026-05-28 04:32:30 -04:00
fix(admin_audit): Avoid crash when rename event fileid changes
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>
This commit is contained in:
parent
5f63c89955
commit
e2a0ed080b
1 changed files with 1 additions and 1 deletions
|
|
@ -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(),
|
||||
|
|
|
|||
Loading…
Reference in a new issue