diff --git a/CRM/Case/BAO/Case.php b/CRM/Case/BAO/Case.php index 0e4260c3ef8e..c78b6f6deda3 100644 --- a/CRM/Case/BAO/Case.php +++ b/CRM/Case/BAO/Case.php @@ -396,7 +396,6 @@ public static function retrieveCaseIdsByContactId($contactID, $includeDeleted = $caseArray[] = $dao->id; } - $dao->free(); return $caseArray; } @@ -894,7 +893,6 @@ public static function getCaseRoles($contactID, $caseID, $relationshipID = NULL, $values[$rid]['relationship_direction'] = $dao->relationship_direction; } - $dao->free(); return $values; } @@ -1218,7 +1216,6 @@ public static function getCaseActivity($caseID, &$params, $contactID, $context = $caseActivities[$caseActivityId]['links'] = $url; } - $dao->free(); $caseActivitiesDT = array(); $caseActivitiesDT['data'] = array_values($caseActivities); @@ -1318,7 +1315,6 @@ public static function getRelatedContacts($caseID, $includeDetails = TRUE) { $values[] = $details; } } - $dao->free(); return $values; } @@ -1802,7 +1798,6 @@ public static function getCaseActivityDates($caseID, $criteriaParams = array(), $values[$dao->id]['id'] = $dao->id; $values[$dao->id]['activity_date'] = $dao->activity_date; } - $dao->free(); return $values; } @@ -2007,7 +2002,6 @@ public static function getRelatedCaseIds($caseId, $excludeDeleted = TRUE) { while ($dao->fetch()) { $relatedCaseIds[$dao->case_id] = $dao->case_id; } - $dao->free(); return array_values($relatedCaseIds); } @@ -2080,7 +2074,6 @@ public static function getRelatedCases($caseId, $excludeDeleted = TRUE) { 'links' => $caseView, ); } - $dao->free(); return $relatedCases; } @@ -2254,7 +2247,6 @@ public static function mergeCases( while ($dao->fetch()) { $singletonActivityIds[] = $dao->id; } - $dao->free(); } } diff --git a/CRM/Contact/BAO/Contact.php b/CRM/Contact/BAO/Contact.php index 9e59eb0327d0..f73eb8a94909 100644 --- a/CRM/Contact/BAO/Contact.php +++ b/CRM/Contact/BAO/Contact.php @@ -2553,7 +2553,6 @@ public static function getPrimaryEmail($contactID) { if ($dao->fetch()) { $email = $dao->email; } - $dao->free(); return $email; } @@ -2581,7 +2580,6 @@ public static function getPrimaryOpenId($contactID) { if ($dao->fetch()) { $openId = $dao->openid; } - $dao->free(); return $openId; } @@ -3559,7 +3557,6 @@ public static function deleteObjectWithPrimary($type, $id) { $dao->save(); } } - $dao->free(); } CRM_Utils_Hook::post('delete', $type, $id, $obj); $obj->free(); diff --git a/CRM/Contact/BAO/Query.php b/CRM/Contact/BAO/Query.php index 71497d2e2490..13efcf013d30 100644 --- a/CRM/Contact/BAO/Query.php +++ b/CRM/Contact/BAO/Query.php @@ -4525,7 +4525,6 @@ public static function apiQuery( while ($dao->fetch()) { if ($count) { $noRows = $dao->rowCount; - $dao->free(); return array($noRows, NULL); } $val = $query->store($dao); @@ -4536,7 +4535,6 @@ public static function apiQuery( } $values[$dao->$entityIDField] = $val; } - $dao->free(); return array($values, $options); } @@ -4941,7 +4939,6 @@ public function searchQuery( while ($dao->fetch()) { $ids[] = $dao->id; } - $dao->free(); return implode(',', $ids); } diff --git a/CRM/Core/DAO.php b/CRM/Core/DAO.php index bd850cf2ab9e..47606b2fa9e0 100644 --- a/CRM/Core/DAO.php +++ b/CRM/Core/DAO.php @@ -890,7 +890,6 @@ public static function getTableNames() { while ($dao->fetch()) { $values[] = $dao->TABLE_NAME; } - $dao->free(); return $values; } @@ -941,7 +940,6 @@ public static function checkConstraintExists($tableName, $constraint) { CRM_Core_Error::fatal(); } - $dao->free(); $show[$tableName] = $dao->Create_Table; } @@ -969,7 +967,6 @@ public static function schemaRequiresRebuilding($tables = array("civicrm_contact CRM_Core_Error::fatal(); } - $dao->free(); $show[$tableName] = $dao->Create_Table; } @@ -1005,7 +1002,6 @@ public static function checkFKConstraintInFormat($tableName, $columnName) { CRM_Core_Error::fatal(); } - $dao->free(); $show[$tableName] = $dao->Create_Table; } $constraint = "`FK_{$tableName}_{$columnName}`"; @@ -1027,7 +1023,6 @@ public static function checkFieldHasAlwaysValue($tableName, $columnName, $column $query = "SELECT * FROM $tableName WHERE $columnName != '$columnValue'"; $dao = CRM_Core_DAO::executeQuery($query); $result = $dao->fetch() ? FALSE : TRUE; - $dao->free(); return $result; } @@ -1044,7 +1039,6 @@ public static function checkFieldIsAlwaysNull($tableName, $columnName) { $query = "SELECT * FROM $tableName WHERE $columnName IS NOT NULL"; $dao = CRM_Core_DAO::executeQuery($query); $result = $dao->fetch() ? FALSE : TRUE; - $dao->free(); return $result; } @@ -1065,7 +1059,6 @@ public static function checkTableExists($tableName) { $dao = CRM_Core_DAO::executeQuery($query, $params); $result = $dao->fetch() ? TRUE : FALSE; - $dao->free(); return $result; } @@ -1432,7 +1425,6 @@ public static function &executeQuery( ) { // we typically do this for insert/update/delete statements OR if explicitly asked to // free the dao - $dao->free(); } return $dao; }