@@ -38,7 +38,7 @@ public function add(Entry $entry)
38
38
$ con = $ this ->getConnectionResource ();
39
39
40
40
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 ));
42
42
}
43
43
44
44
return $ this ;
@@ -52,7 +52,7 @@ public function update(Entry $entry)
52
52
$ con = $ this ->getConnectionResource ();
53
53
54
54
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 ));
56
56
}
57
57
}
58
58
@@ -64,7 +64,7 @@ public function remove(Entry $entry)
64
64
$ con = $ this ->getConnectionResource ();
65
65
66
66
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 ));
68
68
}
69
69
}
70
70
@@ -76,7 +76,7 @@ public function rename(Entry $entry, $newRdn, $removeOldRdn = true)
76
76
$ con = $ this ->getConnectionResource ();
77
77
78
78
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 ));
80
80
}
81
81
}
82
82
0 commit comments