[REF] Fix PHP8.1 issue with passing NULL to trim()
authorSeamus Lee <seamuslee001@gmail.com>
Thu, 28 Apr 2022 00:58:22 +0000 (10:58 +1000)
committerTim Otten <totten@civicrm.org>
Tue, 10 May 2022 06:05:12 +0000 (23:05 -0700)
CRM/Core/CodeGen/Specification.php

index b4f2c26f48a1982eebf98950fbfd596bd71891ba..719db4ee524328c31b6b8caa44ea0b1c5e7ba7b6 100644 (file)
@@ -706,7 +706,7 @@ class CRM_Core_CodeGen_Specification {
     $foreignKey = [
       'idColumn' => trim($foreignXML->idColumn),
       'typeColumn' => trim($foreignXML->typeColumn),
-      'key' => trim($this->value('key', $foreignXML)),
+      'key' => trim($this->value('key', $foreignXML) ?? ''),
     ];
     $dynamicForeignKeys[] = $foreignKey;
   }