Skip to content

Commit bcb6a85

Browse files
Merge branch '5.0' into 5.1
* 5.0: Fix abstract method name in PHP doc block Various cleanups [HttpClient] fix issues in tests Fixes sprintf(): Too few arguments in form transformer [Console] Fix QuestionHelper::disableStty() [Validator] Use Mime component to determine mime type for file validator validate subforms in all validation groups Update Hungarian translations Add meaningful message when Process is not installed (ProcessHelper) [PropertyAccess] Fix TypeError parsing again. [TwigBridge] fix fallback html-to-txt body converter [Security/Http] fix merge [ErrorHandler] fix setting $trace to null in FatalError [Form] add missing Czech validators translation [Validator] add missing Czech translations never directly validate Existence (Required/Optional) constraints
2 parents 60575be + 4f7e2a4 commit bcb6a85

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

Adapter/ExtLdap/EntryManager.php

Lines changed: 8 additions & 8 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": '.ldap_error($con), $entry->getDn()), ldap_errno($con));
41+
throw new LdapException(sprintf('Could not add entry "%s": ', $entry->getDn()).ldap_error($con), ldap_errno($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": '.ldap_error($con), $entry->getDn()), ldap_errno($con));
55+
throw new LdapException(sprintf('Could not update entry "%s": ', $entry->getDn()).ldap_error($con), ldap_errno($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": '.ldap_error($con), $entry->getDn()), ldap_errno($con));
67+
throw new LdapException(sprintf('Could not remove entry "%s": ', $entry->getDn()).ldap_error($con), ldap_errno($con));
6868
}
6969
}
7070

@@ -79,7 +79,7 @@ public function addAttributeValues(Entry $entry, string $attribute, array $value
7979
$con = $this->getConnectionResource();
8080

8181
if (!@ldap_mod_add($con, $entry->getDn(), [$attribute => $values])) {
82-
throw new LdapException(sprintf('Could not add values to entry "%s", attribute %s: '.ldap_error($con), $entry->getDn(), $attribute), ldap_errno($con));
82+
throw new LdapException(sprintf('Could not add values to entry "%s", attribute %s: ', $entry->getDn(), $attribute).ldap_error($con), ldap_errno($con));
8383
}
8484
}
8585

@@ -94,7 +94,7 @@ public function removeAttributeValues(Entry $entry, string $attribute, array $va
9494
$con = $this->getConnectionResource();
9595

9696
if (!@ldap_mod_del($con, $entry->getDn(), [$attribute => $values])) {
97-
throw new LdapException(sprintf('Could not remove values from entry "%s", attribute %s: '.ldap_error($con), $entry->getDn(), $attribute), ldap_errno($con));
97+
throw new LdapException(sprintf('Could not remove values from entry "%s", attribute %s: ', $entry->getDn(), $attribute).ldap_error($con), ldap_errno($con));
9898
}
9999
}
100100

@@ -106,7 +106,7 @@ public function rename(Entry $entry, string $newRdn, bool $removeOldRdn = true)
106106
$con = $this->getConnectionResource();
107107

108108
if (!@ldap_rename($con, $entry->getDn(), $newRdn, null, $removeOldRdn)) {
109-
throw new LdapException(sprintf('Could not rename entry "%s" to "%s": '.ldap_error($con), $entry->getDn(), $newRdn), ldap_errno($con));
109+
throw new LdapException(sprintf('Could not rename entry "%s" to "%s": ', $entry->getDn(), $newRdn).ldap_error($con), ldap_errno($con));
110110
}
111111
}
112112

@@ -122,7 +122,7 @@ public function move(Entry $entry, string $newParent)
122122
$rdn = $this->parseRdnFromEntry($entry);
123123
// deleteOldRdn does not matter here, since the Rdn will not be changing in the move.
124124
if (!@ldap_rename($con, $entry->getDn(), $rdn, $newParent, true)) {
125-
throw new LdapException(sprintf('Could not move entry "%s" to "%s": '.ldap_error($con), $entry->getDn(), $newParent), ldap_errno($con));
125+
throw new LdapException(sprintf('Could not move entry "%s" to "%s": ', $entry->getDn(), $newParent).ldap_error($con), ldap_errno($con));
126126
}
127127
}
128128

@@ -152,7 +152,7 @@ public function applyOperations(string $dn, iterable $operations): void
152152
}
153153

154154
if (!@ldap_modify_batch($this->getConnectionResource(), $dn, $operationsMapped)) {
155-
throw new UpdateOperationException(sprintf('Error executing UpdateOperation on "%s": '.ldap_error($this->getConnectionResource()), $dn), ldap_errno($con));
155+
throw new UpdateOperationException(sprintf('Error executing UpdateOperation on "%s": ', $dn).ldap_error($this->getConnectionResource()), ldap_errno($con));
156156
}
157157
}
158158

0 commit comments

Comments
 (0)