Skip to content

Commit e50bc7e

Browse files
Improve codestyle
Co-authored-by: Nicolas Grekas <nicolas.grekas@gmail.com>
1 parent 288793e commit e50bc7e

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

src/Symfony/Component/Ldap/Adapter/ExtLdap/Connection.php

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -159,12 +159,10 @@ private function connect()
159159
}
160160
}
161161

162-
$connectResult = ldap_connect($this->config['connection_string']);
163-
164-
if (false === $connectResult) {
165-
throw new LdapException('Syntax of the (computed) connection string is bad: '.$this->config['connection_string']);
162+
if (false === $connection = ldap_connect($this->config['connection_string'])) {
163+
throw new LdapException('Invalid connection string: '.$this->config['connection_string']);
166164
} else {
167-
$this->connection = $connectResult;
165+
$this->connection = $connection;
168166
}
169167

170168
foreach ($this->config['options'] as $name => $value) {

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy