Details
Description
in 4.6.5 "Find Grants" would fail for multivalue fields (select, radio, checkbox) that now works, but fails for Status and Type (possibly more.)
To reproduce on demo, go to "Find Grant" and try Status or Type.
I couldn't check on master as the demo user does not have permissions set for Grants.
Backtrace:
#1 /home/xxxxx/public_html/test/sites/all/modules/civicrm/CRM/Utils/Type.php(262): CRM_Core_Error::fatal("(8) is not of the type Integer")
#2 /home/xxxxx/public_html/test/sites/all/modules/civicrm/CRM/Contact/BAO/Query.php(5215): CRM_Utils_Type::escape("(8)", "Integer")
#3 /home/xxxxx/public_html/test/sites/all/modules/civicrm/CRM/Grant/BAO/Query.php(247): CRM_Contact_BAO_Query::buildClause("civicrm_grant.status_id", "IN", "(8)", "Integer")
#4 /home/xxxxx/public_html/test/sites/all/modules/civicrm/CRM/Grant/BAO/Query.php(115): CRM_Grant_BAO_Query::whereClauseSingle((Array:5), Object(CRM_Contact_BAO_Query))
#5 /home/xxxxx/public_html/test/sites/all/modules/civicrm/CRM/Core/Component.php(298): CRM_Grant_BAO_Query::where(Object(CRM_Contact_BAO_Query))
#6 /home/xxxxx/public_html/test/sites/all/modules/civicrm/CRM/Contact/BAO/Query.php(1894): CRM_Core_Component::alterQuery(Object(CRM_Contact_BAO_Query), "where")
#7 /home/xxxxx/public_html/test/sites/all/modules/civicrm/CRM/Contact/BAO/Query.php(499): CRM_Contact_BAO_Query->whereClause()
#8 /home/xxxxx/public_html/test/sites/all/modules/civicrm/CRM/Contact/BAO/Query.php(461): CRM_Contact_BAO_Query->initialize()
#9 /home/xxxxx/public_html/test/sites/all/modules/civicrm/CRM/Grant/Selector/Search.php(168): CRM_Contact_BAO_Query->__construct((Array:3), NULL, NULL, FALSE, FALSE, 128)
#10 /home/xxxxx/public_html/test/sites/all/modules/civicrm/CRM/Grant/Form/Search.php(244): CRM_Grant_Selector_Search->__construct((Array:3), 1, NULL, FALSE, NULL, "search")
#11 /home/xxxxx/public_html/test/sites/all/modules/civicrm/CRM/Core/Form.php(345): CRM_Grant_Form_Search->postProcess()
#12 /home/xxxxx/public_html/test/sites/all/modules/civicrm/CRM/Core/QuickForm/Action/Refresh.php(75): CRM_Core_Form->mainProcess()
#13 /home/xxxxx/public_html/test/sites/all/modules/civicrm/packages/HTML/QuickForm/Controller.php(203): CRM_Core_QuickForm_Action_Refresh->perform(Object(CRM_Grant_Form_Search), "refresh")
#14 /home/xxxxx/public_html/test/sites/all/modules/civicrm/packages/HTML/QuickForm/Page.php(103): HTML_QuickForm_Controller->handle(Object(CRM_Grant_Form_Search), "refresh")
#15 /home/xxxxx/public_html/test/sites/all/modules/civicrm/CRM/Core/Controller.php(353): HTML_QuickForm_Page->handle("refresh")
#16 /home/xxxxx/public_html/test/sites/all/modules/civicrm/CRM/Core/Invoke.php(312): CRM_Core_Controller->run((Array:3), NULL)
#17 /home/xxxxx/public_html/test/sites/all/modules/civicrm/CRM/Core/Invoke.php(86): CRM_Core_Invoke::runItem((Array:14))
#18 /home/xxxxx/public_html/test/sites/all/modules/civicrm/CRM/Core/Invoke.php(54): CRM_Core_Invoke::_invoke((Array:3))
#19 /home/xxxxx/public_html/test/sites/all/modules/civicrm/drupal/civicrm.module(489): CRM_Core_Invoke::invoke((Array:3))
#20 [internal function](): civicrm_invoke("grant", "search")
#21 /home/xxxxx/public_html/test/includes/menu.inc(519): call_user_func_array("civicrm_invoke", (Array:2))
#22 /home/xxxxx/public_html/test/index.php(21): menu_execute_active_handler()