Skip to content

Commit b29d163

Browse files
committed
Merge branch '3.3' into 3.4
* 3.3: [HttpFoundation] Support 0 bit netmask in IPv6 () [DI] Impossible to set an environment variable and then an array as container parameter [LDAP] added missing dots at the end of some exception messages. Set `width: auto` on WebProfiler toolbar's reset. [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 [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 1d932ae + cd91c0e commit b29d163

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
@@ -38,7 +38,7 @@ public function add(Entry $entry)
3838
$con = $this->getConnectionResource();
3939

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

4444
return $this;
@@ -52,7 +52,7 @@ public function update(Entry $entry)
5252
$con = $this->getConnectionResource();
5353

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

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

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

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

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

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['scope']));
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)