From 3053b96391cea166b1b71f890c39752abe686a40 Mon Sep 17 00:00:00 2001 From: Seamus Lee Date: Fri, 4 Jun 2021 22:41:45 +0000 Subject: [PATCH] [php8-compat] Fix php beautifier notice by conditionally assinging dynamic foreign key to the template --- CRM/Core/CodeGen/Specification.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/CRM/Core/CodeGen/Specification.php b/CRM/Core/CodeGen/Specification.php index a7db6024e4..0c379947e0 100644 --- a/CRM/Core/CodeGen/Specification.php +++ b/CRM/Core/CodeGen/Specification.php @@ -287,7 +287,9 @@ class CRM_Core_CodeGen_Specification { $this->getDynamicForeignKey($foreignXML, $dynamicForeign, $name); } } - $table['dynamicForeignKey'] = $dynamicForeign; + if (!empty($dynamicForeign)) { + $table['dynamicForeignKey'] = $dynamicForeign; + } } $tables[$name] = &$table; -- 2.25.1