Browse Source

Fix warning about passing null to substr_count

Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
pull/29432/head
Côme Chilliet 5 years ago
parent
commit
ee7ef77808
No known key found for this signature in database GPG Key ID: A3E2F658B28C760A
  1. 2
      lib/private/Share20/DefaultShareProvider.php

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

Loading…
Cancel
Save