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
No known key found for this signature in database
GPG Key ID: A3E2F658B28C760A
1 changed files with
1 additions and
1 deletions
-
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 = [ |
|
|
|
|