CRM-17335 reduce use of nullArray
authoreileen <emcnaughton@wikimedia.org>
Tue, 10 May 2016 23:16:32 +0000 (11:16 +1200)
committereileen <emcnaughton@wikimedia.org>
Tue, 10 May 2016 23:17:10 +0000 (11:17 +1200)
The null array static is a work-around for pass-by-reference signatures but the executeQuery no longer requires it.

It's not actually 'just' tidy-up as the array can become contaminated, leading to hard to diagnose bugs.

Note there is one instance of a similar tidy up on contribution::create in this - the  parameter is no longer mandatory & we call this function so often I feel confident about removing the stray & too

38 files changed:
CRM/ACL/Page/ACL.php
CRM/ACL/Page/ACLBasic.php
CRM/Activity/Form/Task/SearchTaskHookSample.php
CRM/Admin/Form/LocationType.php
CRM/Admin/Form/PaymentProcessor.php
CRM/Admin/Form/PaymentProcessorType.php
CRM/Badge/BAO/Layout.php
CRM/Campaign/BAO/Survey.php
CRM/Case/BAO/Case.php
CRM/Case/Form/Task/SearchTaskHookSample.php
CRM/Contact/BAO/Contact.php
CRM/Contact/BAO/Contact/Utils.php
CRM/Contact/BAO/Relationship.php
CRM/Contact/Form/Task/PDFLetterCommon.php
CRM/Contribute/BAO/Contribution.php
CRM/Contribute/BAO/ContributionRecur.php
CRM/Core/BAO/LabelFormat.php
CRM/Core/BAO/LocationType.php
CRM/Core/BAO/PaperSize.php
CRM/Core/BAO/PdfFormat.php
CRM/Core/BAO/Tag.php
CRM/Custom/Form/Field.php
CRM/Event/BAO/Event.php
CRM/Event/BAO/Participant.php
CRM/Event/Form/SelfSvcTransfer.php
CRM/Event/Form/SelfSvcUpdate.php
CRM/Event/Form/Task/SearchTaskHookSample.php
CRM/Grant/BAO/Grant.php
CRM/Grant/Form/Task/SearchTaskHookSample.php
CRM/Mailing/Event/BAO/Queue.php
CRM/Mailing/Event/BAO/Unsubscribe.php
CRM/Mailing/Form/Subscribe.php
CRM/Member/BAO/MembershipStatus.php
CRM/Report/Form.php
bin/ContributionProcessor.php
sql/GenerateGroups.php
sql/GenerateMailing.php
sql/GenerateReportData.php

index 3a5861faf8efe3d0da2f8c7f6e00df2a59914690..0e0da8ed2a69e31a407b89fe53dc3aa056f0278f 100644 (file)
@@ -152,9 +152,7 @@ class CRM_ACL_Page_ACL extends CRM_Core_Page_Basic {
    WHERE ( object_table IN ( 'civicrm_saved_search', 'civicrm_uf_group', 'civicrm_custom_group', 'civicrm_event' ) )
 ORDER BY entity_id
 ";
-    $dao = CRM_Core_DAO::executeQuery($query,
-      CRM_Core_DAO::$_nullArray
-    );
+    $dao = CRM_Core_DAO::executeQuery($query);
 
     $roles = CRM_Core_OptionGroup::values('acl_role');
 
index 410e49ca8123fa3f0ecbb1f5451cb29b7d19c1b1..1432e1bc352be3d9cfe22af6c9eff5428d5ca686 100644 (file)
@@ -129,9 +129,7 @@ class CRM_ACL_Page_ACLBasic extends CRM_Core_Page_Basic {
    WHERE ( object_table NOT IN ( 'civicrm_saved_search', 'civicrm_uf_group', 'civicrm_custom_group' ) )
 ORDER BY entity_id
 ";
-    $dao = CRM_Core_DAO::executeQuery($query,
-      CRM_Core_DAO::$_nullArray
-    );
+    $dao = CRM_Core_DAO::executeQuery($query);
 
     $roles = CRM_Core_OptionGroup::values('acl_role');
 
index 0a40c36e197b9575f6c85423e0bdcdd010583b7c..191260b8337a7e8433ca53cd8500131df39b0bea 100644 (file)
@@ -60,9 +60,7 @@ INNER JOIN civicrm_contact ct ON ( ac.contact_id = ct.id )
  LEFT JOIN civicrm_option_value ov ON (at.activity_type_id = ov.value AND og.id = ov.option_group_id )
      WHERE at.id IN ( $activityIDs )";
 
-    $dao = CRM_Core_DAO::executeQuery($query,
-      CRM_Core_DAO::$_nullArray
-    );
+    $dao = CRM_Core_DAO::executeQuery($query);
 
     while ($dao->fetch()) {
       $rows[] = array(
index 68d2980c0bb1f70a138dd1bdf38d65202413b847..06284afc4e0cba2cbea03282a3ce54fcf4399249 100644 (file)
@@ -110,7 +110,7 @@ class CRM_Admin_Form_LocationType extends CRM_Admin_Form {
 
     if ($params['is_default']) {
       $query = "UPDATE civicrm_location_type SET is_default = 0";
-      CRM_Core_DAO::executeQuery($query, CRM_Core_DAO::$_nullArray);
+      CRM_Core_DAO::executeQuery($query);
     }
 
     if ($this->_action & CRM_Core_Action::UPDATE) {
index a0367bb24bf16df4350d3f82766d9b42023335fc..760725fcd3f0e578407d50350e5c14979cd5c3e6 100644 (file)
@@ -362,7 +362,7 @@ class CRM_Admin_Form_PaymentProcessor extends CRM_Admin_Form {
 
     if (!empty($values['is_default'])) {
       $query = "UPDATE civicrm_payment_processor SET is_default = 0 WHERE domain_id = $domainID";
-      CRM_Core_DAO::executeQuery($query, CRM_Core_DAO::$_nullArray);
+      CRM_Core_DAO::executeQuery($query);
     }
 
     $this->updatePaymentProcessor($values, $domainID, FALSE);
index 0cc74ba8da51096d799d989ee5b5455ab9ea08ca..c7434f213bd8fe3b2e3108928c96019eca0fafd7 100644 (file)
@@ -215,7 +215,7 @@ class CRM_Admin_Form_PaymentProcessorType extends CRM_Admin_Form {
     if (!empty($values['is_default'])) {
       $query = "
 UPDATE civicrm_payment_processor SET is_default = 0";
-      CRM_Core_DAO::executeQuery($query, CRM_Core_DAO::$_nullArray);
+      CRM_Core_DAO::executeQuery($query);
     }
 
     $dao = new CRM_Financial_DAO_PaymentProcessorType();
index 5de4043d7648d737d4b62934a5a60db817b22bc6..c077725b4edd4a0fa60b1ceec80b1c4fd7ee3ef6 100644 (file)
@@ -112,7 +112,7 @@ class CRM_Badge_BAO_Layout extends CRM_Core_DAO_PrintLabel {
 
     if ($params['is_default']) {
       $query = "UPDATE civicrm_print_label SET is_default = 0";
-      CRM_Core_DAO::executeQuery($query, CRM_Core_DAO::$_nullArray);
+      CRM_Core_DAO::executeQuery($query);
     }
 
     $printLabel->save();
index 97be80f88941e1bbd3549be8fc457c0a5ef0d7c1..ff49c73629c31b6dde85a888ffab1fd165e83861 100644 (file)
@@ -78,7 +78,7 @@ class CRM_Campaign_BAO_Survey extends CRM_Campaign_DAO_Survey {
 
     if (!empty($params['is_default'])) {
       $query = "UPDATE civicrm_survey SET is_default = 0";
-      CRM_Core_DAO::executeQuery($query, CRM_Core_DAO::$_nullArray);
+      CRM_Core_DAO::executeQuery($query);
     }
 
     if (!(CRM_Utils_Array::value('id', $params))) {
index ea347d0dda323c381a965896e9e8dd10f876aebb..ad5b33a74da0d705d61b6b9fea70077209faf530 100644 (file)
@@ -775,7 +775,7 @@ SELECT case_status.label AS case_status, status_id, civicrm_case_type.title AS c
  WHERE is_deleted = 0 AND cc.contact_id IN (SELECT id FROM civicrm_contact WHERE is_deleted <> 1)
 {$myCaseWhereClause} {$myGroupByClause}";
 
-    $res = CRM_Core_DAO::executeQuery($query, CRM_Core_DAO::$_nullArray);
+    $res = CRM_Core_DAO::executeQuery($query);
     while ($res->fetch()) {
       if (!empty($rows[$res->case_type]) && !empty($rows[$res->case_type][$res->case_status])) {
         $rows[$res->case_type][$res->case_status]['count'] = $rows[$res->case_type][$res->case_status]['count'] + 1;
@@ -1562,7 +1562,7 @@ SELECT case_status.label AS case_status, status_id, civicrm_case_type.title AS c
 
     $query = self::getCaseActivityQuery($type, $userID, $condition, $cases['case_deleted']);
 
-    $res = CRM_Core_DAO::executeQuery($query, CRM_Core_DAO::$_nullArray);
+    $res = CRM_Core_DAO::executeQuery($query);
 
     $activityInfo = array();
     while ($res->fetch()) {
@@ -2140,7 +2140,7 @@ SELECT civicrm_contact.id as casemanager_id,
             $from = ' FROM ' . $tableName;
             $where = " WHERE {$tableName}.entity_id = {$otherCaseId}";
             $query = $insert . $select . $from . $where;
-            $dao = CRM_Core_DAO::executeQuery($query, CRM_Core_DAO::$_nullArray);
+            $dao = CRM_Core_DAO::executeQuery($query);
           }
         }
 
index 345a10b5b6722120d2611fca42bb493950e8de06..844cfe81e5d95b6ce761e3ce66f5f9a4188da2a2 100644 (file)
@@ -57,7 +57,7 @@ INNER JOIN civicrm_contact ct ON ( cc.contact_id = ct.id)
 LEFT  JOIN civicrm_option_value ov ON (cs.status_id = ov.value AND ov.option_group_id = {$statusId} )
 WHERE cs.id IN ( {$caseIDs} )";
 
-    $dao = CRM_Core_DAO::executeQuery($query, CRM_Core_DAO::$_nullArray);
+    $dao = CRM_Core_DAO::executeQuery($query);
     while ($dao->fetch()) {
       $rows[] = array(
         'display_name' => $dao->display_name,
index 309d552023105311c6e6700c65c226f42353140a..41fdfdbde50a93b7de0ced71d88b25426da2d8ac 100644 (file)
@@ -956,7 +956,7 @@ WHERE     civicrm_contact.id = " . CRM_Utils_Type::escape($id, 'Integer');
 UPDATE civicrm_contact
 SET image_URL=NULL
 WHERE id={$id}; ";
-    CRM_Core_DAO::executeQuery($query, CRM_Core_DAO::$_nullArray);
+    CRM_Core_DAO::executeQuery($query);
     return TRUE;
   }
 
index 5324795647e176a6136b611de405a6c48207d359..896c2faf666a702a98c04de00be729ab0902d1b1 100644 (file)
@@ -266,7 +266,7 @@ UNION
 UNION
 ( SELECT location_type_id FROM civicrm_address WHERE contact_id = {$contactId} )
 ";
-    $dao = CRM_Core_DAO::executeQuery($query, CRM_Core_DAO::$_nullArray);
+    $dao = CRM_Core_DAO::executeQuery($query);
     return $dao->N;
   }
 
@@ -555,7 +555,7 @@ UPDATE civicrm_contact
    SET organization_name=NULL, employer_id = NULL
  WHERE employer_id={$employerId}; ";
 
-    $dao = CRM_Core_DAO::executeQuery($query, CRM_Core_DAO::$_nullArray);
+    $dao = CRM_Core_DAO::executeQuery($query);
   }
 
   /**
index 079bb8b440679351e66873830fe13f9f055211af..26ca09eb47c40a96e8bdfcd86236fdf351d13ee0 100644 (file)
@@ -1797,7 +1797,7 @@ FROM civicrm_contact
 WHERE id IN ( {$contacts} )
 ";
 
-    $dao = CRM_Core_DAO::executeQuery($query, CRM_Core_DAO::$_nullArray);
+    $dao = CRM_Core_DAO::executeQuery($query);
     $currentEmployer = array();
     while ($dao->fetch()) {
       $currentEmployer[$dao->id]['org_id'] = $dao->employer_id;
index da9c8f6ec313239077c1c1240000e38b6d2acf68..c27a2b15b2e5695c06520939ce95cda11e67070f 100644 (file)
@@ -281,7 +281,7 @@ class CRM_Contact_Form_Task_PDFLetterCommon {
       else {
         $query = "UPDATE civicrm_msg_template SET pdf_format_id = NULL WHERE id = {$formValues['template']}";
       }
-      CRM_Core_DAO::executeQuery($query, CRM_Core_DAO::$_nullArray);
+      CRM_Core_DAO::executeQuery($query);
     }
     if (!empty($formValues['update_format'])) {
       $bao = new CRM_Core_BAO_PdfFormat();
index 55365b66c7ff574f91147440fb54cc2e7c49d6dd..eadd13900e0f3d44cb9a747a898200115888637a 100644 (file)
@@ -1332,7 +1332,7 @@ WHERE  civicrm_contribution.contact_id = civicrm_contact.id
       $additionalWhere
       GROUP BY currency
       ";
-    $dao = CRM_Core_DAO::executeQuery($query, CRM_Core_DAO::$_nullArray);
+    $dao = CRM_Core_DAO::executeQuery($query);
     $count = 0;
     $amount = $average = array();
     while ($dao->fetch()) {
index da44e17b04b6dd45e25a359ae32237f1f92fdd74..c4a93e3bbd0fd5ef8b9fb16b74cea77b82bef4ff 100644 (file)
@@ -200,7 +200,7 @@ SELECT r.payment_processor_id
          WHERE contribution_recur_id IN ( {$recurID}) AND is_test = 0
          GROUP BY contribution_recur_id";
 
-    $res = CRM_Core_DAO::executeQuery($query, CRM_Core_DAO::$_nullArray);
+    $res = CRM_Core_DAO::executeQuery($query);
 
     while ($res->fetch()) {
       $totalCount[$res->contribution_recur_id] = $res->commpleted;
@@ -598,7 +598,7 @@ INNER JOIN civicrm_contribution       con ON ( con.id = mp.contribution_id )
           $from = ' FROM ' . $tableName;
           $where = " WHERE {$tableName}.entity_id = {$sourceContributionId}";
           $query = $insert . $select . $from . $where;
-          CRM_Core_DAO::executeQuery($query, CRM_Core_DAO::$_nullArray);
+          CRM_Core_DAO::executeQuery($query);
         }
       }
     }
index d6c8800f4b939fd5650130739994e8731e330856..38e8ba1dcf1297167bb9e9994e8b9076698c9672 100644 (file)
@@ -471,7 +471,7 @@ class CRM_Core_BAO_LabelFormat extends CRM_Core_DAO_OptionValue {
     // clear other default if this is the new default label format
     if ($values['is_default']) {
       $query = "UPDATE civicrm_option_value SET is_default = 0 WHERE option_group_id = $group_id";
-      CRM_Core_DAO::executeQuery($query, CRM_Core_DAO::$_nullArray);
+      CRM_Core_DAO::executeQuery($query);
     }
     if ($id) {
       // fetch existing record
index 0f2f2fb0e7a3823baf94beeadffadafccc34f4a8..4c52549a81fabc8e738f6db4f9b8927d8e86d57f 100644 (file)
@@ -133,7 +133,7 @@ class CRM_Core_BAO_LocationType extends CRM_Core_DAO_LocationType {
     $locationType->copyValues($params);
     if (!empty($params['is_default'])) {
       $query = "UPDATE civicrm_location_type SET is_default = 0";
-      CRM_Core_DAO::executeQuery($query, CRM_Core_DAO::$_nullArray);
+      CRM_Core_DAO::executeQuery($query);
     }
 
     $locationType->save();
index eaa673b8fb1bc20e106cbe01b651e3c19203c24d..571abcc062a4a88e26b98712cad77e78716a303d 100644 (file)
@@ -274,7 +274,7 @@ class CRM_Core_BAO_PaperSize extends CRM_Core_DAO_OptionValue {
     // clear other default if this is the new default Paper Size
     if ($values['is_default']) {
       $query = "UPDATE civicrm_option_value SET is_default = 0 WHERE option_group_id = $group_id";
-      CRM_Core_DAO::executeQuery($query, CRM_Core_DAO::$_nullArray);
+      CRM_Core_DAO::executeQuery($query);
     }
     if ($id) {
       // fetch existing record
index d28353a686cc48bb03112984449864311d4b3afe..f88b94c380f754df0a04f02be34810b2a79e1046 100644 (file)
@@ -331,7 +331,7 @@ class CRM_Core_BAO_PdfFormat extends CRM_Core_DAO_OptionValue {
     // clear other default if this is the new default PDF Page Format
     if ($values['is_default']) {
       $query = "UPDATE civicrm_option_value SET is_default = 0 WHERE option_group_id = $group_id";
-      CRM_Core_DAO::executeQuery($query, CRM_Core_DAO::$_nullArray);
+      CRM_Core_DAO::executeQuery($query);
     }
     if ($id) {
       // fetch existing record
index 72de3cb522919bcf919c4027c5d71f669561b933..e22af2bfce8c1179387b22ad982da08e26f61469 100644 (file)
@@ -456,7 +456,7 @@ class CRM_Core_BAO_Tag extends CRM_Core_DAO_Tag {
     $tags = $tagSets = array();
     // first get all the tag sets
     $query = "SELECT id FROM civicrm_tag WHERE is_tagset=1 AND parent_id IS NULL";
-    $dao = CRM_Core_DAO::executeQuery($query, CRM_Core_DAO::$_nullArray);
+    $dao = CRM_Core_DAO::executeQuery($query);
     while ($dao->fetch()) {
       $tagSets[] = $dao->id;
     }
index 81676a071db2780ceb0da9f3d5ae35ca1b2d047e..bf97476eac4bb53598407958d710ff500a7b9d24 100644 (file)
@@ -964,7 +964,7 @@ SELECT id
   FROM civicrm_state_province
  WHERE LOWER(name) = '$fieldStateProvince'
     OR abbreviation = '$fieldStateProvince'";
-          $dao = CRM_Core_DAO::executeQuery($query, CRM_Core_DAO::$_nullArray);
+          $dao = CRM_Core_DAO::executeQuery($query);
           if ($dao->fetch()) {
             $params['default_value'] = $dao->id;
           }
@@ -977,7 +977,7 @@ SELECT id
   FROM civicrm_country
  WHERE LOWER(name) = '$fieldCountry'
     OR iso_code = '$fieldCountry'";
-          $dao = CRM_Core_DAO::executeQuery($query, CRM_Core_DAO::$_nullArray);
+          $dao = CRM_Core_DAO::executeQuery($query);
           if ($dao->fetch()) {
             $params['default_value'] = $dao->id;
           }
index b630a3d5d8c18f45ff8a9c601cce8056e85038a8..6a42e2488395269c461a9c703cd0c0414312b86a 100644 (file)
@@ -194,7 +194,7 @@ class CRM_Event_BAO_Event extends CRM_Event_DAO_Event {
         2 => array($id, 'integer'),
       );
 
-      CRM_Core_DAO::executeQuery($query, CRM_Core_DAO::$_nullArray);
+      CRM_Core_DAO::executeQuery($query);
     }
 
     // price set cleanup, CRM-5527
@@ -1008,7 +1008,7 @@ WHERE civicrm_event.is_active = 1
           $from = ' FROM ' . $tableName;
           $where = " WHERE {$tableName}.entity_id = {$id}";
           $query = $insert . $select . $from . $where;
-          $dao = CRM_Core_DAO::executeQuery($query, CRM_Core_DAO::$_nullArray);
+          $dao = CRM_Core_DAO::executeQuery($query);
         }
       }
     }
index 60ccb75cd732c849d4262c4d2636047ac998d29c..342953570473f23d32ade252858f23899944d458 100644 (file)
@@ -801,7 +801,7 @@ FROM   civicrm_participant
    LEFT JOIN civicrm_contact ON (civicrm_participant.contact_id = civicrm_contact.id)
 WHERE  civicrm_participant.id = {$participantId}
 ";
-    $dao = CRM_Core_DAO::executeQuery($query, CRM_Core_DAO::$_nullArray);
+    $dao = CRM_Core_DAO::executeQuery($query);
 
     $details = array();
     while ($dao->fetch()) {
index ff1456b28a3008d9e5ccc33d5330c16f1eed3d4a..22f1c3f4b8d8b1ec82385be4546cdde61c86a915 100644 (file)
@@ -181,7 +181,7 @@ class CRM_Event_Form_SelfSvcTransfer extends CRM_Core_Form {
       LEFT JOIN civicrm_option_value cov ON cov.value = cp.role_id and cov.option_group_id = {$optionGroupId}
       LEFT JOIN civicrm_event ON civicrm_event.id = cp.event_id
       WHERE cp.id = {$this->_from_participant_id}";
-    $dao = CRM_Core_DAO::executeQuery($query, CRM_Core_DAO::$_nullArray);
+    $dao = CRM_Core_DAO::executeQuery($query);
     while ($dao->fetch()) {
       $details['status']  = $dao->status;
       $details['role'] = $dao->role;
@@ -291,7 +291,7 @@ class CRM_Event_Form_SelfSvcTransfer extends CRM_Core_Form {
     $contact_details = CRM_Contact_BAO_Contact::getContactDetails($contact_id);
     $display_name = $contact_details[0];
     $query = "select event_id from civicrm_participant where contact_id = " . $contact_id;
-    $dao = CRM_Core_DAO::executeQuery($query, CRM_Core_DAO::$_nullArray);
+    $dao = CRM_Core_DAO::executeQuery($query);
     while ($dao->fetch()) {
       $to_event_id[]  = $dao->event_id;
     }
@@ -313,13 +313,13 @@ class CRM_Event_Form_SelfSvcTransfer extends CRM_Core_Form {
     $params = $this->controller->exportValues($this->_name);
     //cancel 'from' participant row
     $query = "select contact_id from civicrm_email where email = '" . $params['email'] . "'";
-    $dao = CRM_Core_DAO::executeQuery($query, CRM_Core_DAO::$_nullArray);
+    $dao = CRM_Core_DAO::executeQuery($query);
     while ($dao->fetch()) {
       $contact_id  = $dao->contact_id;
     }
     $from_participant = $params = array();
     $query = "select role_id, source, fee_level, is_test, is_pay_later, fee_amount, discount_id, fee_currency,campaign_id, discount_amount from civicrm_participant where id = " . $this->_from_participant_id;
-    $dao = CRM_Core_DAO::executeQuery($query, CRM_Core_DAO::$_nullArray);
+    $dao = CRM_Core_DAO::executeQuery($query);
     $value_to = array();
     while ($dao->fetch()) {
       $value_to['role_id'] = $dao->role_id;
index 5be5746a282bd098a51c4c327a1decdf870596cf..7cfb459a7cdd19150fcd196698510b7844f0403e 100644 (file)
@@ -155,7 +155,7 @@ class CRM_Event_Form_SelfSvcUpdate extends CRM_Core_Form {
       LEFT JOIN civicrm_option_value cov ON cov.value = cp.role_id and cov.option_group_id = {$optionGroupId}
       LEFT JOIN civicrm_event ON civicrm_event.id = cp.event_id
       WHERE cp.id = {$this->_participant_id}";
-    $dao = CRM_Core_DAO::executeQuery($query, CRM_Core_DAO::$_nullArray);
+    $dao = CRM_Core_DAO::executeQuery($query);
     while ($dao->fetch()) {
       $details['status']  = $dao->status;
       $details['role'] = $dao->role;
@@ -171,7 +171,7 @@ class CRM_Event_Form_SelfSvcUpdate extends CRM_Core_Form {
       CRM_Utils_System::redirect($url);
     }
     $query = "select start_date as start, selfcancelxfer_time as time from civicrm_event where id = " . $this->_event_id;
-    $dao = CRM_Core_DAO::executeQuery($query, CRM_Core_DAO::$_nullArray);
+    $dao = CRM_Core_DAO::executeQuery($query);
     while ($dao->fetch()) {
       $time_limit  = $dao->time;
       $start_date = $dao->start;
index ac04f5b33a9b846ad1955d0efd3dfb0129fb6f14..b87cbff8480d26fb1cfad98e0ef23e015bdd21e6 100644 (file)
@@ -59,7 +59,7 @@ class CRM_Event_Form_Task_SearchTaskHookSample extends CRM_Event_Form_Task {
  INNER JOIN civicrm_contact ct ON ( p.contact_id = ct.id )
       WHERE p.id IN ( $participantIDs )";
 
-    $dao = CRM_Core_DAO::executeQuery($query, CRM_Core_DAO::$_nullArray);
+    $dao = CRM_Core_DAO::executeQuery($query);
     while ($dao->fetch()) {
       $rows[] = array(
         'display_name' => $dao->display_name,
index a4c30adb8d675454d2c9e2b59f9ac6dc80d1ae41..fbc2ec867e2960f147cb73538aafb147b816a8ff 100644 (file)
@@ -61,7 +61,7 @@ class CRM_Grant_BAO_Grant extends CRM_Grant_DAO_Grant {
             SELECT status_id, count(id) as status_total
             FROM civicrm_grant  GROUP BY status_id";
 
-    $dao = CRM_Core_DAO::executeQuery($query, CRM_Core_DAO::$_nullArray);
+    $dao = CRM_Core_DAO::executeQuery($query);
 
     $status = array();
     $summary = array();
index 7305c2a70ca620613f391b7c40016868b1aa8f6c..b06fb709bec50cd9cd55066300d49b3131059e8a 100644 (file)
@@ -59,7 +59,7 @@ class CRM_Grant_Form_Task_SearchTaskHookSample extends CRM_Grant_Form_Task {
 INNER JOIN civicrm_contact ct ON ( grt.contact_id = ct.id )
      WHERE grt.id IN ( $grantIDs )";
 
-    $dao = CRM_Core_DAO::executeQuery($query, CRM_Core_DAO::$_nullArray);
+    $dao = CRM_Core_DAO::executeQuery($query);
 
     while ($dao->fetch()) {
       $rows[] = array(
index cd34b73ea52565eafaae19b5a3be966b0c8ab1e0..0d947b1c40b26bd18f4f4ddb80442614dceadfc3 100644 (file)
@@ -293,7 +293,7 @@ SELECT DISTINCT(civicrm_mailing_event_queue.contact_id) as contact_id,
    AND civicrm_mailing_event_queue.email_id = civicrm_email.id
    AND civicrm_mailing_event_queue.id = " . CRM_Utils_Type::escape($queueID, 'Integer');
 
-    $dao = CRM_Core_DAO::executeQuery($query, CRM_Core_DAO::$_nullArray);
+    $dao = CRM_Core_DAO::executeQuery($query);
 
     $displayName = 'Unknown';
     $email = 'Unknown';
index 5e3fb52df1dcc9e8c6f91f3707a5e85ea6000a52..71171d1f1b4a8903a5913db98c4d2a585b65ad6d 100644 (file)
@@ -606,7 +606,7 @@ SELECT DISTINCT(civicrm_mailing_event_queue.contact_id) as contact_id,
    AND civicrm_mailing_event_queue.email_id = civicrm_email.id
    AND civicrm_mailing_event_queue.id = " . CRM_Utils_Type::escape($queueID, 'Integer');
 
-    $dao = CRM_Core_DAO::executeQuery($query, CRM_Core_DAO::$_nullArray);
+    $dao = CRM_Core_DAO::executeQuery($query);
 
     $displayName = 'Unknown';
     $email = 'Unknown';
index 28672cba7e2932694b5efd1fa39bc21acc5069ba..c4d89c3cdbf7fa6a5e3db15f6e8ca24981d40cb3 100644 (file)
@@ -56,7 +56,7 @@ SELECT   title, description
    AND   visibility != 'User and User Admin Only'
    AND   $groupTypeCondition";
 
-      $dao = CRM_Core_DAO::executeQuery($query, CRM_Core_DAO::$_nullArray);
+      $dao = CRM_Core_DAO::executeQuery($query);
       if ($dao->fetch()) {
         $this->assign('groupName', $dao->title);
         CRM_Utils_System::setTitle(ts('Subscribe to Mailing List - %1', array(1 => $dao->title)));
@@ -100,7 +100,7 @@ SELECT   id, title, description
    AND   visibility != 'User and User Admin Only'
    AND   $groupTypeCondition
 ORDER BY title";
-      $dao = CRM_Core_DAO::executeQuery($query, CRM_Core_DAO::$_nullArray);
+      $dao = CRM_Core_DAO::executeQuery($query);
       $rows = array();
       while ($dao->fetch()) {
         $row = array();
index ddb458b7d063d976c15b7a8f2ddab4e3dc9e4cfe..3e9033b14acbdc4ecfe451ea02e94fda320b161f 100644 (file)
@@ -283,7 +283,7 @@ class CRM_Member_BAO_MembershipStatus extends CRM_Member_DAO_MembershipStatus {
  WHERE    {$where}
  ORDER BY weight ASC";
 
-    $membershipStatus = CRM_Core_DAO::executeQuery($query, CRM_Core_DAO::$_nullArray);
+    $membershipStatus = CRM_Core_DAO::executeQuery($query);
     $hour = $minute = $second = 0;
 
     while ($membershipStatus->fetch()) {
index 95a8abc75ae75dc984336d3d93415a24b36e0d33..49b6b149d899cd7b5f1a366a4a8c18ed93de1a7d 100644 (file)
@@ -3634,7 +3634,7 @@ ORDER BY cg.weight, cf.weight";
     //CRM-18276 GROUP_CONCAT could be used with singleValueQuery and then exploded,
     //but by default that truncates to 1024 characters, which causes errors with installs with lots of custom field sets
     $customTables = array();
-    $customTablesDAO = CRM_Core_DAO::executeQuery("SELECT table_name FROM civicrm_custom_group", CRM_Core_DAO::$_nullArray);
+    $customTablesDAO = CRM_Core_DAO::executeQuery("SELECT table_name FROM civicrm_custom_group");
     while ($customTablesDAO->fetch()) {
       $customTables[] = $customTablesDAO->table_name;
     }
index 0618eb014b3350e705e44ed515eec792ba8580a6..790f646bbd0fdbc20eee1c452a553235846242a8 100644 (file)
@@ -470,9 +470,7 @@ class CiviContributeProcessor {
       }
     }
 
-    $contribution = &CRM_Contribute_BAO_Contribution::create($params,
-      CRM_Core_DAO::$_nullArray
-    );
+    $contribution = CRM_Contribute_BAO_Contribution::create($params);
     if (!$contribution->id) {
       return FALSE;
     }
index 2e1e8d6187804db03be7f86e4ef184c4a781b290..f8a5e5a01a3672c5d18882fc5c71db65c1bc3aba 100644 (file)
@@ -45,7 +45,7 @@ $config = CRM_Core_Config::singleton();
 
 $prefix = 'Automated Generated Group: ';
 $query = "DELETE FROM civicrm_group where name like '%{$prefix}%'";
-CRM_Core_DAO::executeQuery($query, CRM_Core_DAO::$_nullArray);
+CRM_Core_DAO::executeQuery($query);
 
 $numGroups = 100;
 
index 68bb79b9c1899eb18f6f15cf27f458b06bd97e5c..d3c2d7ecd63b70acd9d74a1a98cc291d7eca342c 100644 (file)
@@ -54,7 +54,7 @@ $tables = array(
 );
 foreach ($tables as $t) {
   $query = "DELETE FROM $t";
-  CRM_Core_DAO::executeQuery($query, CRM_Core_DAO::$_nullArray);
+  CRM_Core_DAO::executeQuery($query);
 }
 
 $prefix = 'Automated Mailing Gen: ';
index 765c1488d238b4390b250cc5b9e1ca132ac54981..23d0965c6140787d165bee532c7fbacf8333b4a2 100644 (file)
@@ -1563,7 +1563,7 @@ INSERT INTO `civicrm_pcp`
 VALUES
     ({$this->individual[3]}, 2, 'My Personal Civi Fundraiser', 'I''m on a mission to get all my friends and family to help support my favorite open-source civic sector CRM.', '<p>Friends and family - please help build much needed infrastructure for the civic sector by supporting my personal campaign!</p>\r\n<p><a href=\"https://civicrm.org\">You can learn more about CiviCRM here</a>.</p>\r\n<p>Then click the <strong>Contribute Now</strong> button to go to our easy-to-use online contribution form.</p>', 'Contribute Now', 1, 1, 1, 5000.00, NULL, 1);
 ";
-    CRM_Core_DAO::executeQuery($query, CRM_Core_DAO::$_nullArray);
+    CRM_Core_DAO::executeQuery($query);
   }
 
   public function addContribution() {