$config->logging = TRUE;
}
if ($config->logging) {
- $this->fixSchemaDifferencesForALL();
+ $this->fixSchemaDifferencesForAll();
}
// invoke the meta trigger creation call
CRM_Core_DAO::triggerRebuild(NULL, TRUE);
// should treat it as a modification.
$this->resetSchemaCacheForTable("log_$table");
$logTableSchema = $this->columnSpecsOf("log_$table");
- foreach ($cols['ADD'] as $colKey => $col) {
- if (array_key_exists($col, $logTableSchema)) {
- $cols['MODIFY'][] = $col;
- unset($cols['ADD'][$colKey]);
+ if (!empty($cols['ADD'])) {
+ foreach ($cols['ADD'] as $colKey => $col) {
+ if (array_key_exists($col, $logTableSchema)) {
+ $cols['MODIFY'][] = $col;
+ unset($cols['ADD'][$colKey]);
+ }
}
}