1 file changed
+6
-1
lines changedLines changed: 6 additions & 1 deletion
<
9EA4
table aria-label="Diff for: src/Symfony/Component/Ldap/Adapter/ExtLdap/Query.php" class="tab-size width-full DiffLines-module__tableLayoutFixed--YZcIJ" data-diff-anchor="diff-24b79f3ac1a99938f5acb158a450e38d30c1984a5d333b5b20f2c38a73d10e31" data-tab-size="8" data-paste-markdown-skip="true" role="grid" style="--line-number-cell-width:44px;--line-number-cell-width-unified:88px">Original file line number Diff line number Diff line change
@@ -89,7 +89,12 @@ public function execute()
89
89
}
90
90
91
91
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
+ $ldapError = '';
93
+ if ($errno = ldap_errno($con)) {
94
+ $ldapError = sprintf(' LDAP error was [%d] %s', $errno, ldap_error($con));
95
+ }
96
+
97
+ throw new LdapException(sprintf('Could not complete search with dn "%s", query "%s" and filters "%s".%s', $this->dn, $this->query, implode(',', $this->options['filter']), $ldapError));
93
98
}
94
99
95
100
return new Collection($this->connection, $this);
0 commit comments