This repository was archived by the owner on May 17, 2021. It is now read-only.
File tree 1 file changed +4
-3
lines changed
1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change 2
2
3
3
namespace FR3D \LdapBundle \Driver ;
4
4
5
+ use FR3D \LdapBundle \Exception \SanitizingException ;
5
6
use FR3D \LdapBundle \Model \LdapUserInterface ;
6
7
use Psr \Log \LoggerInterface ;
7
8
use Symfony \Component \Security \Core \User \UserInterface ;
8
9
use Zend \Ldap \Exception \LdapException as ZendLdapException ;
9
10
use Zend \Ldap \Ldap ;
10
- use FR3D \LdapBundle \Exception \SanitizingException ;
11
11
12
12
/**
13
13
* This class adapt ldap calls to Zend Framework Ldap library functions.
@@ -94,10 +94,11 @@ public function bind(UserInterface $user, $password)
94
94
* Treat a Zend Ldap Exception.
95
95
*
96
96
* @param ZendLdapException $exception
97
+ * @param string $password
97
98
*/
98
- protected function zendExceptionHandler (ZendLdapException $ exception , $ password )
99
+ protected function zendExceptionHandler (ZendLdapException $ exception , $ password = null )
99
100
{
100
- $ sanitizedException = new SanitizingException ($ exception , $ password );
101
+ $ sanitizedException = null !== $ password ? new SanitizingException ($ exception , $ password ) : $ exception ;
101
102
102
103
switch ($ exception ->getCode ()) {
103
104
// Error level codes
You can’t perform that action at this time.
0 commit comments