mirror of
https://codeberg.org/icewind/SMB.git
synced 2026-06-03 17:24:07 +02:00
fix new psalm issues
This commit is contained in:
parent
5c6a422076
commit
9dba42ab2a
5 changed files with 26 additions and 11 deletions
|
|
@ -21,6 +21,8 @@
|
|||
|
||||
namespace Icewind\SMB;
|
||||
|
||||
use Icewind\SMB\Exception\Exception;
|
||||
|
||||
class AnonymousAuth implements IAuth {
|
||||
public function getUsername(): ?string {
|
||||
return null;
|
||||
|
|
@ -39,6 +41,8 @@ class AnonymousAuth implements IAuth {
|
|||
}
|
||||
|
||||
public function setExtraSmbClientOptions($smbClientState): void {
|
||||
smbclient_option_set($smbClientState, SMBCLIENT_OPT_AUTO_ANONYMOUS_LOGIN, true);
|
||||
if (smbclient_option_set($smbClientState, SMBCLIENT_OPT_AUTO_ANONYMOUS_LOGIN, true) === false) {
|
||||
throw new Exception("Failed to set smbclient options for anonymous auth");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue