mirror of
https://github.com/nextcloud/server.git
synced 2026-06-09 00:32:29 -04:00
Fix warning about passing null to substr_count
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
This commit is contained in:
parent
9d170f1269
commit
ee7ef77808
1 changed files with 1 additions and 1 deletions
|
|
@ -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…
Reference in a new issue