diff options
author | Côme Chilliet <come.chilliet@nextcloud.com> | 2021-10-25 14:33:19 +0200 |
---|---|---|
committer | Côme Chilliet <come.chilliet@nextcloud.com> | 2021-11-23 09:29:00 +0100 |
commit | ee7ef7780868b6c40745bde8758921e01958af9d (patch) | |
tree | 07d7bb680545ca3b0f58710820066bcafe48f3e9 /lib/private/Share20 | |
parent | 9d170f1269adebf0996bd631b18e0a2a83bf02c9 (diff) | |
download | nextcloud-server-ee7ef7780868b6c40745bde8758921e01958af9d.tar.gz nextcloud-server-ee7ef7780868b6c40745bde8758921e01958af9d.zip |
Fix warning about passing null to substr_count
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
Diffstat (limited to 'lib/private/Share20')
-rw-r--r-- | lib/private/Share20/DefaultShareProvider.php | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/private/Share20/DefaultShareProvider.php b/lib/private/Share20/DefaultShareProvider.php index 85655c4e379..a6a8bdb9698 100644 --- a/lib/private/Share20/DefaultShareProvider.php +++ b/lib/private/Share20/DefaultShareProvider.php @@ -1363,7 +1363,7 @@ class DefaultShareProvider implements IShareProvider { $best = []; $bestDepth = 0; foreach ($shares as $id => $share) { - $depth = substr_count($share['file_target'], '/'); + $depth = substr_count(($share['file_target'] ?? ''), '/'); if (empty($best) || $depth < $bestDepth) { $bestDepth = $depth; $best = [ |