Dear all,

It seems that when several Base DNs are configured in the LDAP Query in the function query() during the array_merge the variable count is overwritten with the count of the last query.
That makes inestability with more results in the total query than the value of the 'count' variable in the array.

Example
Base DN 1 : returns 318 results
Base DN 2 : returns 1 result
at the end after merging the total results is an array with the 318 results but the 'count' variable within the results array has the value 1 (wrong!)

That creates inconsistency when parsing the results because 'count' variable is taken into account to iterate over the results. (so in the example only 1 results is parsed)

Many thanks,

CommentFileSizeAuthor
#1 1431134.patch647 bytesjohnbarclay

Comments

johnbarclay’s picture

Version: 7.x-1.0-unstable5 » 7.x-1.x-dev
Status: Active » Needs review
StatusFileSize
new647 bytes

here's a patch for this. Can you test?

chris.leversuch’s picture

Status: Needs review » Reviewed & tested by the community

Found the same problem myself today and fixed it locally with exactly the same change.

johnbarclay’s picture

Title: Ldap Query array_merge issue » Ldap Query array_merge count value incorrect issue
Status: Reviewed & tested by the community » Fixed

thanks. this is committed to head.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.