Skip to content

Commit 53f1cfc

Browse files
Various cleanups
1 parent 98dd0f4 commit 53f1cfc

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

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": '.ldap_error($con), $entry->getDn()));
41+
throw new LdapException(sprintf('Could not add entry "%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": '.ldap_error($con), $entry->getDn()));
55+
throw new LdapException(sprintf('Could not update entry "%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": '.ldap_error($con), $entry->getDn()));
67+
throw new LdapException(sprintf('Could not remove entry "%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": '.ldap_error($con), $entry->getDn(), $newRdn));
79+
throw new LdapException(sprintf('Could not rename entry "%s" to "%s": ', $entry->getDn(), $newRdn).ldap_error($con));
8080
}
8181
}
8282

0 commit comments

Comments
 (0)