when I go to ad-users view I get the following errors:
Warning: array_multisort(): Array sizes are inconsistent in ldap_views_plugin_query_ldap->execute() (line 301 of C:\inetpub\wwwroot\workersworld\sites\all\modules\ldap\ldap_views\plugins\ldap_views_plugin_query_ldap.inc).
Warning: array_multisort(): Array sizes are inconsistent in ldap_views_plugin_query_ldap->execute() (line 307 of C:\inetpub\wwwroot\workersworld\sites\all\modules\ldap\ldap_views\plugins\ldap_views_plugin_query_ldap.inc).

CommentFileSizeAuthor
#1 ldap-fix-php-warning-1623584-0.patch607 bytesalanrussian

Comments

alanrussian’s picture

Component: Miscellaneous » Code
Category: support » bug
Status: Active » Patch (to be ported)
StatusFileSize
new607 bytes

This patch fixed the issue for me. There appeared to be an extra call_user_func_array('array_multisort', $params);.

johnbarclay’s picture

Title: Warning: array_multisort(): Array sizes are inconsistent in ldap_views_plugin_query_ldap->execute() (line 301 of C:\inetpub\wwwr » LDAP Views: Warning: array_multisort(): Array sizes are inconsistent in ldap_views_plugin_query_ldap->execute()
Status: Patch (to be ported) » Fixed

I committed this to the 1.x and 2.x branch. Thanks.

Status: Fixed » Closed (fixed)

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

drasgardian’s picture

Status: Closed (fixed) » Patch (to be ported)

This issue still exists in the latest 7.x-1.x-dev

trumanru’s picture

Same problem in 7.x-2.x-dev described here: http://drupal.org/node/1773850

johnbarclay’s picture

Status: Patch (to be ported) » Needs work
grahl’s picture

Issue summary: View changes
Status: Needs work » Closed (outdated)

Due to no feedback in over three years I presume no one else is seeing this. Please reopen with more information otherwise.

tklawsuc’s picture

My issue was related to empty values for certain fields so if you sorted on those fields you ended up with an incomplete array of data as the empty fields were being left out. I don't have a patch for this but here is what I did:
ldap_views -> ldap_views_plugin_query_ldap
Basically if the alias doesn't exist in the entry then I still continued through to add it to the sort_fields data with a null value.

if (is_array($entry) && array_key_exists($alias, $entry)) {
          if (is_array($entry[$alias])) {
            switch ($field->options['multivalue']) {
              ...
          if (array_key_exists($alias, $sort_fields)) {
            $sort_fields[$alias]['data'][$key] = $entry[$alias];
          }
        }
if (is_array($entry)) {
          if (array_key_exists($alias, $entry) && is_array($entry[$alias])) {
            switch ($field->options['multivalue']) {
              ...
          if (array_key_exists($alias, $sort_fields)) {
            $sort_fields[$alias]['data'][$key] = empty($entry[$alias])? null : $entry[$alias];
          }

Also worth mentioning that this is in version 2.3

grahl’s picture

@tklawsuc: Please don't simply comment on closed issues, it's not a guarantee that someone notices that and this issue is extremely old. Either reopen the issue if it really is the same issue or create a new one. If you create a new one you can still easily link to this issue through the "Related issues" reference if you think it's related.

tklawsuc’s picture

@grahl thanks for the notice. I was just posting it here for people to have as reference in case they stumble on this link searching for the exact same issue as the title of this error...as in my case.