PHP 8.1 compatibility improvement
authorJohn Kingsnorth <john@johnkingsnorth.co.uk>
Fri, 13 Jan 2023 12:06:54 +0000 (12:06 +0000)
committerGitHub <noreply@github.com>
Fri, 13 Jan 2023 12:06:54 +0000 (12:06 +0000)
CRM/Logging/Schema.php

index bbe7801f215a19228cd93a154a8fed57b6f9c24e..f1f5847cc4a2095e80dfb059f84dfc5f874ee0f2 100644 (file)
@@ -743,7 +743,7 @@ WHERE  table_schema IN ('{$this->db}', '{$civiDB}')";
           }
           elseif (
             $civiTableSpecs[$col]['COLUMN_DEFAULT'] != ($logTableSpecs[$col]['COLUMN_DEFAULT'] ?? NULL)
-            && !stristr($civiTableSpecs[$col]['COLUMN_DEFAULT'], 'timestamp')
+            && !stristr(($civiTableSpecs[$col]['COLUMN_DEFAULT'] ?? ''), 'timestamp')
             && !($civiTableSpecs[$col]['COLUMN_DEFAULT'] === NULL && ($logTableSpecs[$col]['COLUMN_DEFAULT'] ?? NULL) === 'NULL')
           ) {
             // if default property is different, and its not about a timestamp column, consider it