Browse Source

Fix warning about passing null to substr_count

Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
tags/v24.0.0beta1
Côme Chilliet 2 years ago
parent
commit
ee7ef77808
No account linked to committer's email address
1 changed files with 1 additions and 1 deletions
  1. 1
    1
      lib/private/Share20/DefaultShareProvider.php

+ 1
- 1
lib/private/Share20/DefaultShareProvider.php View File

@@ -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 = [

Loading…
Cancel
Save