diff options
author | Carl Schwan <carl@carlschwan.eu> | 2022-01-21 15:59:10 +0300 |
---|---|---|
committer | Carl Schwan <carl@carlschwan.eu> | 2022-01-21 15:59:10 +0300 |
commit | 9a32672c2600b8b0414eae6527c6ed9263c1e2c7 (patch) | |
tree | e6508171c09fc39f93382b87a49e3cab4c6cb5ae /apps/files_external | |
parent | 17025d6f814f1b7db6077df21d1740282766cf92 (diff) |
Fix accessing undefined offsets
Move this to inside the else clause of the count($matches)
Signed-off-by: Carl Schwan <carl@carlschwan.eu>
Diffstat (limited to 'apps/files_external')
-rw-r--r-- | apps/files_external/lib/Lib/Backend/SMB.php | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/apps/files_external/lib/Lib/Backend/SMB.php b/apps/files_external/lib/Lib/Backend/SMB.php index 57ee866f3c7..70eaa206483 100644 --- a/apps/files_external/lib/Lib/Backend/SMB.php +++ b/apps/files_external/lib/Lib/Backend/SMB.php @@ -108,14 +108,12 @@ class SMB extends Backend { if (empty($realm)) { $realm = 'WORKGROUP'; } - $userPart = $matches[1]; - $domainPart = $matches[2]; if (count($matches) === 0) { $username = $user; $workgroup = $realm; } else { - $username = $userPart; - $workgroup = $domainPart; + $username = $matches[1];; + $workgroup = $matches[2]; } $smbAuth = new BasicAuth( $username, |