Skip to content

Commit fa1aedd

Browse files
committed
log warnings to give admins more infos about possibly miscalculated activities.
Signed-off-by: Jan Messer <jan@mtec-studios.ch>
1 parent 631c13d commit fa1aedd

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

lib/FilesHooks.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -570,13 +570,17 @@ protected function getUserPathsFromPath($path, $uidOwner) {
570570
try {
571571
$node = $this->rootFolder->getUserFolder($uidOwner)->get($path);
572572
} catch (NotFoundException $e) {
573+
$this->logger->warning('Path "{path}" with owner "{uidOwner}" was not found',
574+
['path'=> $path, 'uidOwner'=>$uidOwner]);
573575
return [
574576
'users' => [],
575577
'remotes' => [],
576578
];
577579
}
578580

579581
if (!$node instanceof Node) {
582+
$this->logger->warning('Path "{path}" of "{uidOwner}" is not a valid type.',
583+
['path'=> $path, 'uidOwner'=>$uidOwner]);
580584
return [
581585
'users' => [],
582586
'remotes' => [],

0 commit comments

Comments
 (0)