Merge pull request #14832 from mattwire/profileformsession
[civicrm-core.git] / CRM / Logging / Schema.php
index 8b5f53d6b3cb8e7518f0f6e6ab8c4e16b6393f47..72c8322a565ffa91c6beb76a1fd71268c403ec3e 100644 (file)
@@ -913,6 +913,13 @@ COLS;
 
     // logging is enabled, so now lets create the trigger info tables
     foreach ($tableNames as $table) {
+      if (!isset($this->logTableSpec[$table])) {
+        // Per testIgnoreCustomTableByHook this would be unset if a hook had
+        // intervened to prevent logging / triggers on this table.
+        // This could go to the extent of blocking the updates to 'modified_date'
+        // which makes sense, in particular, for calculated fields.
+        continue;
+      }
       $columns = $this->columnsOf($table, $force);
 
       // only do the change if any data has changed