mirror of
https://github.com/nextcloud/server.git
synced 2026-06-11 09:42:09 -04:00
Merge pull request #47252 from nextcloud/bugfix/noid/dont-crash-when-creating-folder
fix(adminaudit): Don't crash when creating folder
This commit is contained in:
commit
15550de8ce
1 changed files with 3 additions and 2 deletions
|
|
@ -159,10 +159,11 @@ class Files extends Action {
|
|||
* @param BeforeNodeWrittenEvent $event
|
||||
*/
|
||||
public function write(BeforeNodeWrittenEvent $event): void {
|
||||
$node = $event->getNode();
|
||||
try {
|
||||
$params = [
|
||||
'id' => $event->getNode()->getId(),
|
||||
'path' => mb_substr($event->getNode()->getInternalPath(), 5),
|
||||
'id' => $node instanceof NonExistingFile ? null : $node->getId(),
|
||||
'path' => mb_substr($node->getInternalPath(), 5),
|
||||
];
|
||||
} catch (InvalidPathException|NotFoundException $e) {
|
||||
\OCP\Server::get(LoggerInterface::class)->error(
|
||||
|
|
|
|||
Loading…
Reference in a new issue