Skip to content

Commit 43a0820

Browse files
Merge branch '3.4' into 4.0
* 3.4: (22 commits) fix merge [Translation] Fix InvalidArgumentException when using untranslated plural forms from .po files Fixed exit code with non-integer throwable code [HttpFoundation] Support 0 bit netmask in IPv6 () [DI] Impossible to set an environment variable and then an array as container parameter [Process] remove false-positive BC breaking exception on Windows Tweaking class not found autowiring error [LDAP] added missing dots at the end of some exception messages. [TwigBridge] Add missing dev requirement for workflow fixed #25440 empty lines don't count for indent detection Set `width: auto` on WebProfiler toolbar's reset. [Lock] Fix incorrect phpdoc [Process] Dont rely on putenv(), it fails on ZTS PHP [HttpKernel] detect deprecations thrown by container initialization during tests [HttpKernel] Fix logging of post-terminate errors/exceptions [DI] Add context to service-not-found exceptions thrown by service locators [Debug] Fix catching fatal errors in case of nested error handlers [VarDumper] Fixed file links leave blank pages when ide is configured Fix hidden currency element with Bootstrap 3 theme ...
2 parents 20c2f99 + b29d163 commit 43a0820

File tree

5 files changed

+14
-14
lines changed

5 files changed

+14
-14
lines changed

Adapter/ExtLdap/Collection.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ public function count()
4848
return $count;
4949
}
5050

51-
throw new LdapException(sprintf('Error while retrieving entry count: %s', ldap_error($this->connection->getResource())));
51+
throw new LdapException(sprintf('Error while retrieving entry count: %s.', ldap_error($this->connection->getResource())));
5252
}
5353

5454
public function getIterator()
@@ -62,7 +62,7 @@ public function getIterator()
6262
}
6363

6464
if (false === $current) {
65-
throw new LdapException(sprintf('Could not rewind entries array: %s', ldap_error($con)));
65+
throw new LdapException(sprintf('Could not rewind entries array: %s.', ldap_error($con)));
6666
}
6767

6868
yield $this->getSingleEntry($con, $current);
@@ -105,15 +105,15 @@ private function getSingleEntry($con, $current)
105105
$attributes = ldap_get_attributes($con, $current);
106106

107107
if (false === $attributes) {
108-
throw new LdapException(sprintf('Could not fetch attributes: %s', ldap_error($con)));
108+
throw new LdapException(sprintf('Could not fetch attributes: %s.', ldap_error($con)));
109109
}
110110

111111
$attributes = $this->cleanupAttributes($attributes);
112112

113113
$dn = ldap_get_dn($con, $current);
114114

115115
if (false === $dn) {
116-
throw new LdapException(sprintf('Could not fetch DN: %s', ldap_error($con)));
116+
throw new LdapException(sprintf('Could not fetch DN: %s.', ldap_error($con)));
117117
}
118118

119119
return new Entry($dn, $attributes);

Adapter/ExtLdap/Connection.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -134,11 +134,11 @@ private function connect()
134134
}
135135

136136
if (false === $this->connection) {
137-
throw new LdapException(sprintf('Could not connect to Ldap server: %s', ldap_error($this->connection)));
137+
throw new LdapException(sprintf('Could not connect to Ldap server: %s.', ldap_error($this->connection)));
138138
}
139139

140140
if ('tls' === $this->config['encryption'] && false === ldap_start_tls($this->connection)) {
141-
throw new LdapException(sprintf('Could not initiate TLS connection: %s', ldap_error($this->connection)));
141+
throw new LdapException(sprintf('Could not initiate TLS connection: %s.', ldap_error($this->connection)));
142142
}
143143
}
144144

Adapter/ExtLdap/ConnectionOptions.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ public static function getOption($name)
6565
$constantName = self::getOptionName($name);
6666

6767
if (!defined($constantName)) {
68-
throw new LdapException(sprintf('Unknown option "%s"', $name));
68+
throw new LdapException(sprintf('Unknown option "%s".', $name));
6969
}
7070

7171
return constant($constantName);

Adapter/ExtLdap/EntryManager.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ public function add(Entry $entry)
3737
$con = $this->getConnectionResource();
3838

3939
if (!@ldap_add($con, $entry->getDn(), $entry->getAttributes())) {
40-
throw new LdapException(sprintf('Could not add entry "%s": %s', $entry->getDn(), ldap_error($con)));
40+
throw new LdapException(sprintf('Could not add entry "%s": %s.', $entry->getDn(), ldap_error($con)));
4141
}
4242

4343
return $this;
@@ -51,7 +51,7 @@ public function update(Entry $entry)
5151
$con = $this->getConnectionResource();
5252

5353
if (!@ldap_modify($con, $entry->getDn(), $entry->getAttributes())) {
54-
throw new LdapException(sprintf('Could not update entry "%s": %s', $entry->getDn(), ldap_error($con)));
54+
throw new LdapException(sprintf('Could not update entry "%s": %s.', $entry->getDn(), ldap_error($con)));
5555
}
5656
}
5757

@@ -63,7 +63,7 @@ public function remove(Entry $entry)
6363
$con = $this->getConnectionResource();
6464

6565
if (!@ldap_delete($con, $entry->getDn())) {
66-
throw new LdapException(sprintf('Could not remove entry "%s": %s', $entry->getDn(), ldap_error($con)));
66+
throw new LdapException(sprintf('Could not remove entry "%s": %s.', $entry->getDn(), ldap_error($con)));
6767
}
6868
}
6969

@@ -75,7 +75,7 @@ public function rename(Entry $entry, $newRdn, $removeOldRdn = true)
7575
$con = $this->getConnectionResource();
7676

7777
if (!@ldap_rename($con, $entry->getDn(), $newRdn, null, $removeOldRdn)) {
78-
throw new LdapException(sprintf('Could not rename entry "%s" to "%s": %s', $entry->getDn(), $newRdn, ldap_error($con)));
78+
throw new LdapException(sprintf('Could not rename entry "%s" to "%s": %s.', $entry->getDn(), $newRdn, ldap_error($con)));
7979
}
8080
}
8181

Adapter/ExtLdap/Query.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ public function __destruct()
4545
$this->search = null;
4646

4747
if (!$success) {
48-
throw new LdapException(sprintf('Could not free results: %s', ldap_error($con)));
48+
throw new LdapException(sprintf('Could not free results: %s.', ldap_error($con)));
4949
}
5050
}
5151

@@ -73,7 +73,7 @@ public function execute()
7373
$func = 'ldap_search';
7474
break;
7575
default:
76-
throw new LdapException(sprintf('Could not search in scope %s', $this->options['scopen']));
76+
throw new LdapException(sprintf('Could not search in scope "%s".', $this->options['scope']));
7777
}
7878

7979
$this->search = @$func(
@@ -89,7 +89,7 @@ public function execute()
8989
}
9090

9191
if (false === $this->search) {
92-
throw new LdapException(sprintf('Could not complete search with dn "%s", query "%s" and filters "%s"', $this->dn, $this->query, implode(',', $this->options['filter'])));
92+
throw new LdapException(sprintf('Could not complete search with dn "%s", query "%s" and filters "%s".', $this->dn, $this->query, implode(',', $this->options['filter'])));
9393
}
9494

9595
return new Collection($this->connection, $this);

0 commit comments

Comments
 (0)