diff options
author | Côme Chilliet <come.chilliet@nextcloud.com> | 2023-02-28 12:16:37 +0100 |
---|---|---|
committer | Côme Chilliet (Rebase PR Action) <come-nc@users.noreply.github.com> | 2023-05-04 17:55:09 +0000 |
commit | 6034cc6893eba6e294970966ad9a6389488948d1 (patch) | |
tree | f752e995291380d240ef24fa3298bdd4556003a6 /lib | |
parent | f8b4e0025b46a115d62ab088174c654bde28ed22 (diff) | |
download | nextcloud-server-6034cc6893eba6e294970966ad9a6389488948d1.tar.gz nextcloud-server-6034cc6893eba6e294970966ad9a6389488948d1.zip |
Make sure to never trigger files hooks on a null path
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/private/Files/Node/HookConnector.php | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/private/Files/Node/HookConnector.php b/lib/private/Files/Node/HookConnector.php index 149ffafd46b..c61e098c227 100644 --- a/lib/private/Files/Node/HookConnector.php +++ b/lib/private/Files/Node/HookConnector.php @@ -1,4 +1,7 @@ <?php + +declare(strict_types=1); + /** * @copyright Copyright (c) 2016, ownCloud, Inc. * @@ -223,7 +226,7 @@ class HookConnector { $this->dispatcher->dispatchTyped($event); } - private function getNodeForPath($path) { + private function getNodeForPath(string $path): Node { $info = Filesystem::getView()->getFileInfo($path); if (!$info) { $fullPath = Filesystem::getView()->getAbsolutePath($path); |