Body: <p>It seems it's not possible to sort event participants by name after the search. To reproduce: </p>
  
  <ul>
  <li>Go to events, find participants, </li>
  <li>Select an event under event name, </li>
  <li>Select participant status (example registered), </li>
  <li>Hit the search button. </li>
  <li>The expected results are displayed, </li>
  <li>now click on the Participant column of the search results to sort alphabetically by name </li>
  <li>now you get 'No matches found' for our search criteria. </li>
  <li>Hit the search button again.</li>
  </ul>
  
  <p>Now the results are redisplayed with this warning message:</p>
  
  <pre><code>Warning: array_key_exists(): The first argument should be either a string or an integer in CRM_Utils_Array::value() (line 55 of /srv/buildkit/build/d46/sites/all/modules/civicrm/CRM/Utils/Array.php).
  Notice: Array to string conversion in CRM_Contact_BAO_Query::buildQillForFieldValue() (line 5753 of /srv/buildkit/build/d46/sites/all/modules/civicrm/CRM/Contact/BAO/Query.php).
  </code></pre>
  
  <p>The version of CiviCRM Version is 4.6.24.</p>
  
  <p>It seems this un-expected behaviour only happens when searching for events participants and Participant status is selected. </p>
  
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2016-12-04T19:31:19.703Z
Comments.Text: I just reproduced this situation on http://d46.demo.civicrm.org/ . Sorting on other fields (for example fee lever) has the same result.
Comments.UserDisplayName: Kainuk - CiviCooP
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2016-12-04T19:57:08.410Z
Comments.Text: Can you take a look in JIRA and see if anyone has reported this bug, otherwise it might need adding.
Comments.UserDisplayName: petednz - fuzion
Tags: <civievent><search>
Title: Unable to sort event participants by participant name after search?
ThreadText: # Unable to sort event participants by participant name after search?
  
  (Asked by: username_0 on 2016-12-03)
  
  It seems it's not possible to sort event participants by name after the search. To reproduce:
  
  * Go to events, find participants,
  * Select an event under event name,
  * Select participant status (example registered),
  * Hit the search button.
  * The expected results are displayed,
  * now click on the Participant column of the search results to sort alphabetically by name
  * now you get 'No matches found' for our search criteria.
  * Hit the search button again.
  
  Now the results are redisplayed with this warning message:
  
  ```
  Warning: array_key_exists(): The first argument should be either a string or an integer in CRM_Utils_Array::value() (line 55 of /srv/buildkit/build/d46/sites/all/modules/civicrm/CRM/Utils/Array.php).
  Notice: Array to string conversion in CRM_Contact_BAO_Query::buildQillForFieldValue() (line 5753 of /srv/buildkit/build/d46/sites/all/modules/civicrm/CRM/Contact/BAO/Query.php).
  
  ```
  
  The version of CiviCRM Version is 4.6.24.
  
  It seems this un-expected behaviour only happens when searching for events participants and Participant status is selected.
  
  **Tags:** civievent, search
  
  > **Comments:**
  > **username_1**: I just reproduced this situation on http://d46.demo.civicrm.org/ . Sorting on other fields (for example fee lever) has the same result.  
  > **username_2**: Can you take a look in JIRA and see if anyone has reported this bug, otherwise it might need adding.  
  
  ---
  
  ## 0 answers
  
  