From: John Kingsnorth Date: Fri, 13 Jan 2023 12:06:54 +0000 (+0000) Subject: PHP 8.1 compatibility improvement X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=f20ecd3f6fc06d81e160e2e2b3c3079ff4daa9fe;p=civicrm-core.git PHP 8.1 compatibility improvement --- diff --git a/CRM/Logging/Schema.php b/CRM/Logging/Schema.php index bbe7801f21..f1f5847cc4 100644 --- a/CRM/Logging/Schema.php +++ b/CRM/Logging/Schema.php @@ -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