Skip to content

Commit

Permalink
Merge pull request #14693 from eileenmcnaughton/cust_field_sql
Browse files Browse the repository at this point in the history
[REF] remove instances of pass-by-reference where no change takes place
  • Loading branch information
monishdeb authored Jul 2, 2019
2 parents b280082 + 6477f38 commit 1d52cf0
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions CRM/Core/BAO/SchemaHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -64,13 +64,12 @@ class CRM_Core_BAO_SchemaHandler {
* TRUE if successfully created, FALSE otherwise
*
*/
public static function createTable(&$params) {
public static function createTable($params) {
$sql = self::buildTableSQL($params);
// do not i18n-rewrite
CRM_Core_DAO::executeQuery($sql, [], TRUE, NULL, FALSE, FALSE);

$config = CRM_Core_Config::singleton();
if ($config->logging) {
if (CRM_Core_Config::singleton()->logging) {
// logging support
$logging = new CRM_Logging_Schema();
$logging->fixSchemaDifferencesFor($params['name'], NULL, FALSE);
Expand All @@ -87,7 +86,7 @@ public static function createTable(&$params) {
*
* @return string
*/
public static function buildTableSQL(&$params) {
public static function buildTableSQL($params) {
$sql = "CREATE TABLE {$params['name']} (";
if (isset($params['fields']) &&
is_array($params['fields'])
Expand Down Expand Up @@ -295,7 +294,7 @@ public static function buildForeignKeySQL($params, $separator, $prefix, $tableNa
*
* @return bool
*/
public static function alterFieldSQL(&$params, $indexExist = FALSE, $triggerRebuild = TRUE) {
public static function alterFieldSQL($params, $indexExist = FALSE, $triggerRebuild = TRUE) {

// lets suppress the required flag, since that can cause sql issue
$params['required'] = FALSE;
Expand Down

0 comments on commit 1d52cf0

Please sign in to comment.