Remove unneeded use of CRM_Core_DAO::$_nullArray in executeQuery or similar calls
authorSeamus Lee <seamuslee001@gmail.com>
Mon, 17 Jun 2019 04:55:11 +0000 (14:55 +1000)
committerSeamus Lee <seamuslee001@gmail.com>
Mon, 17 Jun 2019 06:26:10 +0000 (16:26 +1000)
21 files changed:
CRM/Contact/BAO/Contact/Utils.php
CRM/Contact/Form/Search/Custom/ActivitySearch.php
CRM/Contact/Form/Search/Custom/Base.php
CRM/Contact/Form/Search/Custom/ContributionAggregate.php
CRM/Contact/Form/Search/Custom/DateAdded.php
CRM/Contact/Form/Search/Custom/EventAggregate.php
CRM/Contact/Form/Search/Custom/TagContributions.php
CRM/Contact/Page/CustomSearch.php
CRM/Contribute/BAO/ContributionPage.php
CRM/Contribute/Form/AbstractEditPayment.php
CRM/Contribute/Form/Task/SearchTaskHookSample.php
CRM/Contribute/Form/Task/Status.php
CRM/Core/BAO/CustomField.php
CRM/Financial/Form/FinancialAccount.php
CRM/Logging/Schema.php
CRM/Member/BAO/Membership.php
CRM/Member/BAO/MembershipStatus.php
CRM/Upgrade/Form.php
CRM/Upgrade/Incremental/php/FourFive.php
CRM/Upgrade/Incremental/php/FourThree.php
sql/GenerateReportData.php

index a839ce5626e2ce1a689762ee748e9146a6cd97c7..8850d9acc50227b806e5711cbe3223976740535c 100644 (file)
@@ -132,9 +132,7 @@ SELECT count( DISTINCT contact_type )
 FROM   civicrm_contact
 WHERE  id IN ( $idString )
 ";
-    $count = CRM_Core_DAO::singleValueQuery($query,
-      CRM_Core_DAO::$_nullArray
-    );
+    $count = CRM_Core_DAO::singleValueQuery($query);
     return $count > 1 ? TRUE : FALSE;
   }
 
index afda78618c2c1b44213df67ddbfc2b8c17df9a4f..30d95f1847610477d06691ef3a7883547d867e9e 100644 (file)
@@ -368,9 +368,7 @@ ORDER BY contact_a.sort_name';
   public function count() {
     $sql = $this->all();
 
-    $dao = CRM_Core_DAO::executeQuery($sql,
-      CRM_Core_DAO::$_nullArray
-    );
+    $dao = CRM_Core_DAO::executeQuery($sql);
     return $dao->N;
   }
 
index b4edd5986d433669514cea7ece71802b0c00cf32..9baf5429b3ed21345c52a8c399806582c6fce281 100644 (file)
@@ -95,7 +95,7 @@ class CRM_Contact_Form_Search_Custom_Base {
       return $sql;
     }
 
-    return CRM_Core_DAO::composeQuery($sql, CRM_Core_DAO::$_nullArray);
+    return CRM_Core_DAO::composeQuery($sql);
   }
 
   /**
index df9d090461b9fed8e9ab207871720fdacdc79bab..5437e0d2a0253d706cd3008f4032274b06b4996d 100644 (file)
@@ -301,9 +301,7 @@ civicrm_contact AS contact_a {$this->_aclFrom}
   public function count() {
     $sql = $this->all();
 
-    $dao = CRM_Core_DAO::executeQuery($sql,
-      CRM_Core_DAO::$_nullArray
-    );
+    $dao = CRM_Core_DAO::executeQuery($sql);
     return $dao->N;
   }
 
index f3be4f2e2d97d599c906c81907c5475201fc2183..12b3a03e54ff1f6e04802d0760fdd9b0e49d2ac0 100644 (file)
@@ -211,7 +211,7 @@ class CRM_Contact_Form_Search_Custom_DateAdded extends CRM_Contact_Form_Search_C
               date_added >= '$startDate 00:00:00'
               $endDateFix";
 
-    CRM_Core_DAO::executeQuery($dateRange, CRM_Core_DAO::$_nullArray);
+    CRM_Core_DAO::executeQuery($dateRange);
 
     // Only include groups in the search query of one or more Include OR Exclude groups has been selected.
     // CRM-6356
@@ -256,7 +256,7 @@ class CRM_Contact_Form_Search_Custom_DateAdded extends CRM_Contact_Form_Search_C
                      civicrm_group_contact.status = 'Added' AND
                      civicrm_group_contact.group_id IN( {$xGroups})";
 
-        CRM_Core_DAO::executeQuery($excludeGroup, CRM_Core_DAO::$_nullArray);
+        CRM_Core_DAO::executeQuery($excludeGroup);
 
         //search for smart group contacts
         foreach ($this->_excludeGroups as $keys => $values) {
@@ -271,7 +271,7 @@ class CRM_Contact_Form_Search_Custom_DateAdded extends CRM_Contact_Form_Search_C
 
             $smartGroupQuery = " INSERT IGNORE INTO {$this->_xgTable}(contact_id) $smartSql";
 
-            CRM_Core_DAO::executeQuery($smartGroupQuery, CRM_Core_DAO::$_nullArray);
+            CRM_Core_DAO::executeQuery($smartGroupQuery);
           }
         }
       }
@@ -303,7 +303,7 @@ class CRM_Contact_Form_Search_Custom_DateAdded extends CRM_Contact_Form_Search_C
         $includeGroup .= " AND  {$this->_xgTable}.contact_id IS null";
       }
 
-      CRM_Core_DAO::executeQuery($includeGroup, CRM_Core_DAO::$_nullArray);
+      CRM_Core_DAO::executeQuery($includeGroup);
 
       //search for smart group contacts
       foreach ($this->_includeGroups as $keys => $values) {
@@ -330,13 +330,13 @@ class CRM_Contact_Form_Search_Custom_DateAdded extends CRM_Contact_Form_Search_C
                         {$this->_igTable}(contact_id)
                         $smartSql";
 
-          CRM_Core_DAO::executeQuery($smartGroupQuery, CRM_Core_DAO::$_nullArray);
+          CRM_Core_DAO::executeQuery($smartGroupQuery);
           $insertGroupNameQuery = "UPDATE IGNORE {$this->_igTable}
                         SET group_names = (SELECT title FROM civicrm_group
                             WHERE civicrm_group.id = $values)
                         WHERE {$this->_igTable}.contact_id IS NOT NULL
                             AND {$this->_igTable}.group_names IS NULL";
-          CRM_Core_DAO::executeQuery($insertGroupNameQuery, CRM_Core_DAO::$_nullArray);
+          CRM_Core_DAO::executeQuery($insertGroupNameQuery);
         }
       }
     }
@@ -395,9 +395,7 @@ class CRM_Contact_Form_Search_Custom_DateAdded extends CRM_Contact_Form_Search_C
   public function count() {
     $sql = $this->all();
 
-    $dao = CRM_Core_DAO::executeQuery($sql,
-      CRM_Core_DAO::$_nullArray
-    );
+    $dao = CRM_Core_DAO::executeQuery($sql);
     return $dao->N;
   }
 
@@ -405,12 +403,12 @@ class CRM_Contact_Form_Search_Custom_DateAdded extends CRM_Contact_Form_Search_C
     //drop the temp. tables if they exist
     if ($this->_igTable && !empty($this->_includeGroups)) {
       $sql = "DROP TEMPORARY TABLE IF EXISTS {$this->_igTable}";
-      CRM_Core_DAO::executeQuery($sql, CRM_Core_DAO::$_nullArray);
+      CRM_Core_DAO::executeQuery($sql);
     }
 
     if ($this->_xgTable && !empty($this->_excludeGroups)) {
       $sql = "DROP TEMPORARY TABLE IF EXISTS {$this->_xgTable}";
-      CRM_Core_DAO::executeQuery($sql, CRM_Core_DAO::$_nullArray);
+      CRM_Core_DAO::executeQuery($sql);
     }
   }
 
index 441688dab657400d737306576b1ddd79203afc31..e3b36fc95dc76ac3a4e69f5bd37ad9eb72dcf0e3 100644 (file)
@@ -306,9 +306,7 @@ class CRM_Contact_Form_Search_Custom_EventAggregate extends CRM_Contact_Form_Sea
         WHERE   $where
         ";
 
-    $dao = CRM_Core_DAO::executeQuery($sql,
-      CRM_Core_DAO::$_nullArray
-    );
+    $dao = CRM_Core_DAO::executeQuery($sql);
     $totals = [];
     while ($dao->fetch()) {
       $totals['payment_amount'] = $dao->payment_amount;
@@ -329,9 +327,7 @@ class CRM_Contact_Form_Search_Custom_EventAggregate extends CRM_Contact_Form_Sea
   public function count() {
     $sql = $this->all();
 
-    $dao = CRM_Core_DAO::executeQuery($sql,
-      CRM_Core_DAO::$_nullArray
-    );
+    $dao = CRM_Core_DAO::executeQuery($sql);
     return $dao->N;
   }
 
index df0e60488fe1774121e44e2a0a83c844f30a1491..d6bd1b17d8ec73456dfa141d52b01e49d5673ea1 100644 (file)
@@ -229,9 +229,7 @@ WHERE  $where
   public function count() {
     $sql = $this->all();
 
-    $dao = CRM_Core_DAO::executeQuery($sql,
-      CRM_Core_DAO::$_nullArray
-    );
+    $dao = CRM_Core_DAO::executeQuery($sql);
     return $dao->N;
   }
 
index 15b313f23182753fd6a40afb4f82e2b07fafb021..0ee1969f915b7b7fc3cbafafa72ad330d085f2d6 100644 (file)
@@ -56,9 +56,7 @@ AND    g.name = 'custom_search'
 AND    v.is_active = 1
 ORDER By  v.weight
 ";
-    $dao = CRM_Core_DAO::executeQuery($sql,
-      CRM_Core_DAO::$_nullArray
-    );
+    $dao = CRM_Core_DAO::executeQuery($sql);
 
     $rows = [];
     while ($dao->fetch()) {
index fa6c55592e32e76087eafd1c25caa7497d46dea4..164ab946ab2e28a47329c09b60e6d9823e082f16 100644 (file)
@@ -734,7 +734,7 @@ FROM civicrm_premiums
 WHERE entity_table = 'civicrm_contribution_page'
       AND entity_id ={$id}";
 
-    $premiumDao = CRM_Core_DAO::executeQuery($premiumQuery, CRM_Core_DAO::$_nullArray);
+    $premiumDao = CRM_Core_DAO::executeQuery($premiumQuery);
     while ($premiumDao->fetch()) {
       if ($premiumDao->id) {
         CRM_Core_DAO::copyGeneric('CRM_Contribute_DAO_PremiumsProduct', [
index 196a0c348baae2090d1b8333bed4c92ad51787a9..8da1c12557af9b6937ffc18bcd72f923bfeee69a 100644 (file)
@@ -338,9 +338,7 @@ SELECT *
 FROM   civicrm_contribution_product
 WHERE  contribution_id = {$id}
 ";
-    $dao = CRM_Core_DAO::executeQuery($sql,
-      CRM_Core_DAO::$_nullArray
-    );
+    $dao = CRM_Core_DAO::executeQuery($sql);
     if ($dao->fetch()) {
       $this->_premiumID = $dao->id;
       $this->_productDAO = $dao;
index 6c84b5315d193be9ba4d804f3951d14da3490d91..81a3f827df1fe848946569b5ea5446cc766fe828 100644 (file)
@@ -55,9 +55,7 @@ class CRM_Contribute_Form_Task_SearchTaskHookSample extends CRM_Contribute_Form_
 INNER JOIN civicrm_contact ct ON ( co.contact_id = ct.id )
      WHERE co.id IN ( $contribIDs )";
 
-    $dao = CRM_Core_DAO::executeQuery($query,
-      CRM_Core_DAO::$_nullArray
-    );
+    $dao = CRM_Core_DAO::executeQuery($query);
 
     while ($dao->fetch()) {
       $rows[] = [
index bc291dc167b35b69b858d193e7b3f584c14628f9..388362b05cef6830c5f2698776aaa52ecc882fe8 100644 (file)
@@ -70,9 +70,7 @@ SELECT count(*)
 FROM   civicrm_contribution
 WHERE  contribution_status_id != 2
 AND    {$this->_componentClause}";
-    $count = CRM_Core_DAO::singleValueQuery($query,
-      CRM_Core_DAO::$_nullArray
-    );
+    $count = CRM_Core_DAO::singleValueQuery($query);
     if ($count != 0) {
       CRM_Core_Error::statusBounce(ts('Please select only online contributions with Pending status.'));
     }
@@ -110,9 +108,7 @@ FROM   civicrm_contact c,
        civicrm_contribution co
 WHERE  co.contact_id = c.id
 AND    co.id IN ( $contribIDs )";
-    $dao = CRM_Core_DAO::executeQuery($query,
-      CRM_Core_DAO::$_nullArray
-    );
+    $dao = CRM_Core_DAO::executeQuery($query);
 
     // build a row for each contribution id
     $this->_rows = [];
@@ -323,9 +319,7 @@ LEFT JOIN civicrm_participant         p  ON pp.participant_id  = p.id
 WHERE     c.id IN ( $contributionIDs )";
 
     $rows = [];
-    $dao = CRM_Core_DAO::executeQuery($query,
-      CRM_Core_DAO::$_nullArray
-    );
+    $dao = CRM_Core_DAO::executeQuery($query);
 
     while ($dao->fetch()) {
       $rows[$dao->contribution_id]['component'] = $dao->participant_id ? 'event' : 'contribute';
index dcfda0e64bff0811a77fefc1ee5d23979b34b18e..36391dba093c5d8f5ea23860b6fbfbf04a35e1ec 100644 (file)
@@ -1945,9 +1945,7 @@ SELECT count(*)
 FROM   $tableName
 WHERE  $columnName is not null
 ";
-    $count = CRM_Core_DAO::singleValueQuery($query,
-      CRM_Core_DAO::$_nullArray
-    );
+    $count = CRM_Core_DAO::singleValueQuery($query);
     if ($count > 0) {
       $query = "
 SELECT extends
index f304e7fcfa8d4c5c63739f7e960145032d26cc52..227e6d01432b63ea59bb9bc61b5e7942fc72b363 100644 (file)
@@ -53,7 +53,7 @@ class CRM_Financial_Form_FinancialAccount extends CRM_Contribute_Form {
       $params = [
         'id' => $this->_id,
       ];
-      $financialAccount = CRM_Financial_BAO_FinancialAccount::retrieve($params, CRM_Core_DAO::$_nullArray);
+      $financialAccount = CRM_Financial_BAO_FinancialAccount::retrieve($params);
       $financialAccountTypeId = key(CRM_Core_PseudoConstant::accountOptionValues('financial_account_type', NULL, " AND v.name LIKE 'Asset' "));
       if ($financialAccount->financial_account_type_id == $financialAccountTypeId
         && strtolower($financialAccount->account_type_code) == 'ar'
index 9ce4883b18131419b00686628361d7aa97a1259a..858c693813a1091add5053308e01b45fe755eb24 100644 (file)
@@ -581,7 +581,7 @@ AND    (TABLE_NAME LIKE 'log_civicrm_%' $nonStandardTableNameString )
     if ($force || !isset(\Civi::$statics[__CLASS__]['columnsOf'][$table])) {
       $from = (substr($table, 0, 4) == 'log_') ? "`{$this->db}`.$table" : $table;
       CRM_Core_TemporaryErrorScope::ignoreException();
-      $dao = CRM_Core_DAO::executeQuery("SHOW COLUMNS FROM $from", CRM_Core_DAO::$_nullArray, TRUE, NULL, FALSE, FALSE);
+      $dao = CRM_Core_DAO::executeQuery("SHOW COLUMNS FROM $from", [], TRUE, NULL, FALSE, FALSE);
       if (is_a($dao, 'DB_Error')) {
         return [];
       }
@@ -737,7 +737,7 @@ WHERE  table_schema IN ('{$this->db}', '{$civiDB}')";
    * @param string $table
    */
   private function createLogTableFor($table) {
-    $dao = CRM_Core_DAO::executeQuery("SHOW CREATE TABLE $table", CRM_Core_DAO::$_nullArray, TRUE, NULL, FALSE, FALSE);
+    $dao = CRM_Core_DAO::executeQuery("SHOW CREATE TABLE $table", [], TRUE, NULL, FALSE, FALSE);
     $dao->fetch();
     $query = $dao->Create_Table;
 
@@ -785,10 +785,10 @@ COLS;
     $query = self::fixTimeStampAndNotNullSQL($query);
     $query = preg_replace("/(,*\n*\) )ENGINE/m", "$cols\n) ENGINE", $query);
 
-    CRM_Core_DAO::executeQuery($query, CRM_Core_DAO::$_nullArray, TRUE, NULL, FALSE, FALSE);
+    CRM_Core_DAO::executeQuery($query, [], TRUE, NULL, FALSE, FALSE);
 
     $columns = implode(', ', $this->columnsOf($table));
-    CRM_Core_DAO::executeQuery("INSERT INTO `{$this->db}`.log_$table ($columns, log_conn_id, log_user_id, log_action) SELECT $columns, @uniqueID, @civicrm_user_id, 'Initialization' FROM {$table}", CRM_Core_DAO::$_nullArray, TRUE, NULL, FALSE, FALSE);
+    CRM_Core_DAO::executeQuery("INSERT INTO `{$this->db}`.log_$table ($columns, log_conn_id, log_user_id, log_action) SELECT $columns, @uniqueID, @civicrm_user_id, 'Initialization' FROM {$table}", [], TRUE, NULL, FALSE, FALSE);
 
     $this->tables[] = $table;
     if (empty($this->logs)) {
index 49e5181b8be41e3632a807459c1d369e201b7b2f..ed44d86a56d6f104e628357379441403bb9274c7 100644 (file)
@@ -1249,9 +1249,7 @@ SELECT c.contribution_page_id as pageID
    AND mp.membership_id = " . CRM_Utils_Type::escape($membershipID, 'Integer')
       . " ORDER BY mp.id DESC";
 
-    return CRM_Core_DAO::singleValueQuery($query,
-      CRM_Core_DAO::$_nullArray
-    );
+    return CRM_Core_DAO::singleValueQuery($query);
   }
 
   /**
index c3508a7e17765b0a40aa52538626090cc8cfdd09..e6310ae68ee1dfde982bdc5832bbe9e45bce437c 100644 (file)
@@ -137,9 +137,7 @@ class CRM_Member_BAO_MembershipStatus extends CRM_Member_DAO_MembershipStatus {
     // set all other defaults to false.
     if (!empty($params['is_default'])) {
       $query = "UPDATE civicrm_membership_status SET is_default = 0";
-      CRM_Core_DAO::executeQuery($query,
-        CRM_Core_DAO::$_nullArray
-      );
+      CRM_Core_DAO::executeQuery($query);
     }
 
     // action is taken depending upon the mode
index 47f71da3eacf855824472ac6665ef962483fa857..008d42210a4fb5c4dad952e6694b9d1d03124644 100644 (file)
@@ -272,9 +272,7 @@ class CRM_Upgrade_Form extends CRM_Core_Form {
    * @return Object
    */
   public function runQuery($query) {
-    return CRM_Core_DAO::executeQuery($query,
-      CRM_Core_DAO::$_nullArray
-    );
+    return CRM_Core_DAO::executeQuery($query);
   }
 
   /**
index f5b9aada4155a31a7044824339a520787b134b01..cd9f0368a267ea09420c5619b00a873240c4d400 100644 (file)
@@ -84,7 +84,7 @@ AND TABLE_SCHEMA = %1
         $sqlDropFK = "ALTER TABLE `civicrm_msg_template`
 DROP FOREIGN KEY `{$dao->CONSTRAINT_NAME}`,
 DROP KEY `{$dao->CONSTRAINT_NAME}`";
-        CRM_Core_DAO::executeQuery($sqlDropFK, CRM_Core_DAO::$_nullArray, TRUE, NULL, FALSE, FALSE);
+        CRM_Core_DAO::executeQuery($sqlDropFK, [], TRUE, NULL, FALSE, FALSE);
       }
     }
 
index a444e4962bafc8d5a9973a989b2c5e2068828621..a86316e1db80b9d9252632827f4076c6301445b9 100644 (file)
@@ -834,7 +834,7 @@ FROM   civicrm_financial_item fi";
     $query = "
 ALTER TABLE civicrm_domain ADD contact_id INT( 10 ) UNSIGNED NULL DEFAULT NULL COMMENT 'FK to Contact ID. This is specifically not an FK to avoid circular constraints',
  ADD CONSTRAINT FK_civicrm_domain_contact_id FOREIGN KEY (contact_id) REFERENCES civicrm_contact(id);";
-    CRM_Core_DAO::executeQuery($query, CRM_Core_DAO::$_nullArray, TRUE, NULL, FALSE, FALSE);
+    CRM_Core_DAO::executeQuery($query, [], TRUE, NULL, FALSE, FALSE);
 
     $query = '
 SELECT cd.id, cd.name, ce.email FROM civicrm_domain cd
index e50b8ddf469fa09672e6eb4a12b73ad48ce199bb..dd74843a02d672476574357d71923db486b04f2d 100644 (file)
@@ -1322,7 +1322,7 @@ class CRM_GCD {
         ('Student', 'Discount membership for full-time students.', " . $contact_id . ", 1, 50, 'year', 1, 'rolling', null, null, 7, 'b_a', 'Public', 2, 1),
         ('Lifetime', 'Lifetime membership.', " . $contact_id . ", 2, 1200, 'lifetime', 1, 'rolling', null, null, 7, 'b_a', 'Admin', 3, 1);
         ";
-    CRM_Core_DAO::executeQuery($membershipType, CRM_Core_DAO::$_nullArray);
+    CRM_Core_DAO::executeQuery($membershipType);
   }
 
   public function addMembership() {
@@ -1399,9 +1399,9 @@ VALUES
       }
     }
 
-    CRM_Core_DAO::executeQuery($membership, CRM_Core_DAO::$_nullArray);
+    CRM_Core_DAO::executeQuery($membership);
 
-    CRM_Core_DAO::executeQuery($activity, CRM_Core_DAO::$_nullArray);
+    CRM_Core_DAO::executeQuery($activity);
   }
 
   /**
@@ -1445,14 +1445,14 @@ VALUES
       ( NULL, 1, 1, 1, 'E 11B Woodbridge Path SW', 11, 'B', NULL, 'Woodbridge', 'Path', NULL, NULL, NULL, NULL, NULL, 'Dayton', NULL, 1034, NULL, '45417', NULL, 1228, 39.7531, -84.2471, NULL),
       ( NULL, 1, 1, 1, 'E 581O Lincoln Dr SW', 581, 'O', NULL, 'Lincoln', 'Dr', NULL, NULL, NULL, NULL, NULL, 'Santa Fe', NULL, 1030, NULL, '87594', NULL, 1228, 35.5212, -105.982, NULL)
       ";
-    CRM_Core_DAO::executeQuery($event, CRM_Core_DAO::$_nullArray);
+    CRM_Core_DAO::executeQuery($event);
 
     $sql       = "SELECT id from civicrm_address where street_address = 'S 14S El Camino Way E'";
-    $eventAdd1 = CRM_Core_DAO::singleValueQuery($sql, CRM_Core_DAO::$_nullArray);
+    $eventAdd1 = CRM_Core_DAO::singleValueQuery($sql);
     $sql       = "SELECT id from civicrm_address where street_address = 'E 11B Woodbridge Path SW'";
-    $eventAdd2 = CRM_Core_DAO::singleValueQuery($sql, CRM_Core_DAO::$_nullArray);
+    $eventAdd2 = CRM_Core_DAO::singleValueQuery($sql);
     $sql       = "SELECT id from civicrm_address where street_address = 'E 581O Lincoln Dr SW'";
-    $eventAdd3 = CRM_Core_DAO::singleValueQuery($sql, CRM_Core_DAO::$_nullArray);
+    $eventAdd3 = CRM_Core_DAO::singleValueQuery($sql);
 
     $event = "INSERT INTO civicrm_email (contact_id, location_type_id, email, is_primary, is_billing, on_hold, hold_date, reset_date)
        VALUES
@@ -1460,14 +1460,14 @@ VALUES
        (NULL, 1, 'tournaments@example.org', 0, 0, 0, NULL, NULL),
        (NULL, 1, 'celebration@example.org', 0, 0, 0, NULL, NULL)
        ";
-    CRM_Core_DAO::executeQuery($event, CRM_Core_DAO::$_nullArray);
+    CRM_Core_DAO::executeQuery($event);
 
     $sql         = "SELECT id from civicrm_email where email = 'development@example.org'";
-    $eventEmail1 = CRM_Core_DAO::singleValueQuery($sql, CRM_Core_DAO::$_nullArray);
+    $eventEmail1 = CRM_Core_DAO::singleValueQuery($sql);
     $sql         = "SELECT id from civicrm_email where email = 'tournaments@example.org'";
-    $eventEmail2 = CRM_Core_DAO::singleValueQuery($sql, CRM_Core_DAO::$_nullArray);
+    $eventEmail2 = CRM_Core_DAO::singleValueQuery($sql);
     $sql         = "SELECT id from civicrm_email where email = 'celebration@example.org'";
-    $eventEmail3 = CRM_Core_DAO::singleValueQuery($sql, CRM_Core_DAO::$_nullArray);
+    $eventEmail3 = CRM_Core_DAO::singleValueQuery($sql);
 
     $event = "INSERT INTO civicrm_phone (contact_id, location_type_id, is_primary, is_billing, mobile_provider_id, phone, phone_type_id)
        VALUES
@@ -1475,14 +1475,14 @@ VALUES
        (NULL, 1, 0, 0, NULL,'204 223-1000', '1'),
        (NULL, 1, 0, 0, NULL,'303 323-1000', '1')
        ";
-    CRM_Core_DAO::executeQuery($event, CRM_Core_DAO::$_nullArray);
+    CRM_Core_DAO::executeQuery($event);
 
     $sql         = "SELECT id from civicrm_phone where phone = '204 222-1000'";
-    $eventPhone1 = CRM_Core_DAO::singleValueQuery($sql, CRM_Core_DAO::$_nullArray);
+    $eventPhone1 = CRM_Core_DAO::singleValueQuery($sql);
     $sql         = "SELECT id from civicrm_phone where phone = '204 223-1000'";
-    $eventPhone2 = CRM_Core_DAO::singleValueQuery($sql, CRM_Core_DAO::$_nullArray);
+    $eventPhone2 = CRM_Core_DAO::singleValueQuery($sql);
     $sql         = "SELECT id from civicrm_phone where phone = '303 323-1000'";
-    $eventPhone3 = CRM_Core_DAO::singleValueQuery($sql, CRM_Core_DAO::$_nullArray);
+    $eventPhone3 = CRM_Core_DAO::singleValueQuery($sql);
 
     $event = "INSERT INTO civicrm_loc_block ( address_id, email_id, phone_id, address_2_id, email_2_id, phone_2_id)
        VALUES
@@ -1491,14 +1491,14 @@ VALUES
       ( $eventAdd3, $eventEmail3, $eventPhone3, NULL,NULL,NULL)
        ";
 
-    CRM_Core_DAO::executeQuery($event, CRM_Core_DAO::$_nullArray);
+    CRM_Core_DAO::executeQuery($event);
 
     $sql       = "SELECT id from civicrm_loc_block where phone_id = $eventPhone1 AND email_id = $eventEmail1 AND address_id = $eventAdd1";
-    $eventLok1 = CRM_Core_DAO::singleValueQuery($sql, CRM_Core_DAO::$_nullArray);
+    $eventLok1 = CRM_Core_DAO::singleValueQuery($sql);
     $sql       = "SELECT id from civicrm_loc_block where phone_id = $eventPhone2 AND email_id = $eventEmail2 AND address_id = $eventAdd2";
-    $eventLok2 = CRM_Core_DAO::singleValueQuery($sql, CRM_Core_DAO::$_nullArray);
+    $eventLok2 = CRM_Core_DAO::singleValueQuery($sql);
     $sql       = "SELECT id from civicrm_loc_block where phone_id = $eventPhone3 AND email_id = $eventEmail3 AND address_id = $eventAdd3";
-    $eventLok3 = CRM_Core_DAO::singleValueQuery($sql, CRM_Core_DAO::$_nullArray);
+    $eventLok3 = CRM_Core_DAO::singleValueQuery($sql);
 
     //create event fees
     $optionGroup = "INSERT INTO civicrm_option_group ( name, is_reserved, is_active)
@@ -1507,16 +1507,16 @@ VALUES
       ( 'civicrm_event.amount.2', 0, 1),
       ( 'civicrm_event.amount.3', 0, 1)
 ";
-    CRM_Core_DAO::executeQuery($optionGroup, CRM_Core_DAO::$_nullArray);
+    CRM_Core_DAO::executeQuery($optionGroup);
 
     $sql = "SELECT max(id) from civicrm_option_group where name = 'civicrm_event.amount.1'";
-    $page1 = CRM_Core_DAO::singleValueQuery($sql, CRM_Core_DAO::$_nullArray);
+    $page1 = CRM_Core_DAO::singleValueQuery($sql);
 
     $sql = "SELECT max(id) from civicrm_option_group where name = 'civicrm_event.amount.2'";
-    $page2 = CRM_Core_DAO::singleValueQuery($sql, CRM_Core_DAO::$_nullArray);
+    $page2 = CRM_Core_DAO::singleValueQuery($sql);
 
     $sql = "SELECT max(id) from civicrm_option_group where name = 'civicrm_event.amount.3'";
-    $page3 = CRM_Core_DAO::singleValueQuery($sql, CRM_Core_DAO::$_nullArray);
+    $page3 = CRM_Core_DAO::singleValueQuery($sql);
 
     $optionValue = "INSERT INTO civicrm_option_value (option_group_id, label, value, is_default, weight, is_optgroup, is_reserved, is_active)
       VALUES
@@ -1530,16 +1530,16 @@ VALUES
       ($page3, 'Junior Stars (ages 9-12)', '1000', 0, 2, 0, 0, 1),
       ($page3, 'Super Stars (ages 13-18)', '1500', 0, 3, 0, 0, 1)";
 
-    CRM_Core_DAO::executeQuery($optionValue, CRM_Core_DAO::$_nullArray);
+    CRM_Core_DAO::executeQuery($optionValue);
 
     $sql = "SELECT max(id) FROM civicrm_option_value WHERE civicrm_option_value.option_group_id = $page1 AND civicrm_option_value.weight=2";
-    $defaultFee1 = CRM_Core_DAO::singleValueQuery($sql, CRM_Core_DAO::$_nullArray);
+    $defaultFee1 = CRM_Core_DAO::singleValueQuery($sql);
 
     $sql = "SELECT max(id) FROM civicrm_option_value WHERE civicrm_option_value.option_group_id = $page2 AND civicrm_option_value.weight=2";
-    $defaultFee2 = CRM_Core_DAO::singleValueQuery($sql, CRM_Core_DAO::$_nullArray);
+    $defaultFee2 = CRM_Core_DAO::singleValueQuery($sql);
 
     $sql = "SELECT max(id) FROM civicrm_option_value WHERE civicrm_option_value.option_group_id = $page3 AND civicrm_option_value.weight=2";
-    $defaultFee3 = CRM_Core_DAO::singleValueQuery($sql, CRM_Core_DAO::$_nullArray);
+    $defaultFee3 = CRM_Core_DAO::singleValueQuery($sql);
 
     $event = "INSERT INTO civicrm_event
         ( title, summary, description, event_type_id, participant_listing_id, is_public, start_date, end_date, is_online_registration, registration_link_text, max_participants, event_full_text, is_monetary, financial_type_id, is_map, is_active, fee_label, is_show_location, loc_block_id,intro_text, footer_text, confirm_title, confirm_text, confirm_footer_text, is_email_confirm, confirm_email_text, confirm_from_name, confirm_from_email, cc_confirm, bcc_confirm, default_fee_id, thankyou_title, thankyou_text, thankyou_footer_text, is_pay_later, pay_later_text, pay_later_receipt, is_multiple_registrations, allow_same_participant_emails )
@@ -1548,7 +1548,7 @@ VALUES
         ( 'Summer Solstice Festival Day Concert', 'Festival Day is coming! Join us and help support your parks.', 'We will gather at noon, learn a song all together,  and then join in a joyous procession to the pavilion. We will be one of many groups performing at this wonderful concert which benefits our city parks.', 5, 1, 1, '2011-06-01 12:00:00', '2011-06-01 17:00:00', 1, 'Register Now', 50, 'We have all the singers we can handle. Come to the pavilion anyway and join in from the audience.', 1, 2, NULL, 1, 'Festival Fee', 1, $eventLok2, 'Complete the form below and click Continue to register online for the festival. Or you can register by calling us at 204 222-1000 ext 22.', '', 'Confirm Your Registration Information', '', '', 1, 'This email confirms your registration. If you have questions or need to change your registration - please do not hesitate to call us.', 'Event Dept.', 'events@example.org', '', NULL, {$defaultFee2}, 'Thanks for Your Joining In!', '<p>Thank you for your support. Your participation will help build new parks.</p><p>Please tell your friends and colleagues about the concert.</p>', '<p><a href=https://civicrm.org>Back to CiviCRM Home Page</a></p>', 0, NULL, NULL, 1, 0 ),
         ( 'Rain-forest Cup Youth Soccer Tournament', 'Sign up your team to participate in this fun tournament which benefits several Rain-forest protection groups in the Amazon basin.', 'This is a FYSA Sanctioned Tournament, which is open to all USSF/FIFA affiliated organizations for boys and girls in age groups: U9-U10 (6v6), U11-U12 (8v8), and U13-U17 (Full Sided).', 3, 1, 1, '2011-12-27 07:00:00', '2011-12-29 17:00:00', 1, 'Register Now', 500, 'Sorry! All available team slots for this tournament have been filled. Contact Jill Futbol for information about the waiting list and next years event.', 1, 4, NULL, 1, 'Tournament Fees',1, $eventLok3, 'Complete the form below to register your team for this year''s tournament.', '<em>A Soccer Youth Event</em>', 'Review and Confirm Your Registration Information', '', '<em>A Soccer Youth Event</em>', 1, 'Contact our Tournament Director for eligibility details.', 'Tournament Director', 'tournament@example.org', '', NULL, {$defaultFee3}, 'Thanks for Your Support!', '<p>Thank you for your support. Your participation will help save thousands of acres of rainforest.</p>', '<p><a href=https://civicrm.org>Back to CiviCRM Home Page</a></p>', 0, NULL, NULL, 0, 0 )
          ";
-    CRM_Core_DAO::executeQuery($event, CRM_Core_DAO::$_nullArray);
+    CRM_Core_DAO::executeQuery($event);
   }
 
   public function addParticipant() {
@@ -1619,7 +1619,7 @@ VALUES
 
     $sql = "SELECT DISTINCT(contact_id), id, total_amount from civicrm_contribution LIMIT 200";
 
-    $contriInfo = CRM_Core_DAO::executeQuery($sql, CRM_Core_DAO::$_nullArray);
+    $contriInfo = CRM_Core_DAO::executeQuery($sql);
 
     $prevContactID = NULL;
 
@@ -1646,7 +1646,7 @@ VALUES
        (43, 1, 1, 800.00, 'month', 3, 1, 4, '2010-07-01 10:11:09', '2010-06-23 10:11:14', '2010-06-23 10:11:18', NULL, NULL, '2010-04-01 10:11:40', NULL, NULL, 5, 0),
        (32, 1, 1, 600.00, 'month', 1, 1, 3, '2010-06-01 10:12:35', '2010-05-14 10:12:44', '2010-05-14 10:12:52', NULL, NULL, '2010-08-01 10:13:11', NULL, NULL, 5, 0);
 ";
-    CRM_Core_DAO::executeQuery($pledge, CRM_Core_DAO::$_nullArray);
+    CRM_Core_DAO::executeQuery($pledge);
   }
 
   public function addPledgePayment() {
@@ -1662,7 +1662,7 @@ VALUES
          (3, 13, 200.00, '2010-07-01 10:59:35', '2010-06-28 10:59:41', 1, 1),
          (3, null, 200.00, '2010-08-01 11:00:12', null, 0, 2);
         ";
-    CRM_Core_DAO::executeQuery($pledgePayment, CRM_Core_DAO::$_nullArray);
+    CRM_Core_DAO::executeQuery($pledgePayment);
   }
 
   public function addMembershipPayment() {
@@ -1687,7 +1687,7 @@ VALUES
                 WHERE   contribution_page_id IS NULL AND
                         total_amount = {$amount[$i]} limit 0, 50 ";
 
-      $contributionDAO = CRM_Core_DAO::executeQuery($contributionSQL, CRM_Core_DAO::$_nullArray);
+      $contributionDAO = CRM_Core_DAO::executeQuery($contributionSQL);
 
       while ($contributionDAO->fetch()) {
         $contributionsArray[] = $contributionDAO->id;
@@ -1697,7 +1697,7 @@ VALUES
             SELECT  id
                 FROM  civicrm_membership
                 WHERE civicrm_membership.membership_type_id = {$j} limit 0, 50";
-      $membershipDAO = CRM_Core_DAO::executeQuery($membershipSQL, CRM_Core_DAO::$_nullArray);
+      $membershipDAO = CRM_Core_DAO::executeQuery($membershipSQL);
 
       while ($membershipDAO->fetch()) {
         $membershipArray[] = $membershipDAO->id;