mirror of
https://github.com/nextcloud/server.git
synced 2026-02-20 00:12:30 -05:00
fix(adminaudit): Don't crash when creating folder
Signed-off-by: Joas Schilling <coding@schilljs.com>
This commit is contained in:
parent
e218d1f98e
commit
774427a03a
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