From 6506418e61b485f6a2a8ab43205e3fa6f9278625 Mon Sep 17 00:00:00 2001 From: nathangray Date: Fri, 1 Dec 2017 11:58:44 -0700 Subject: [PATCH] * Api - Fix nested custom field merging --- api/src/Storage/Merge.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/api/src/Storage/Merge.php b/api/src/Storage/Merge.php index 8e2e4d1aa6..4be334770e 100644 --- a/api/src/Storage/Merge.php +++ b/api/src/Storage/Merge.php @@ -1427,6 +1427,9 @@ abstract class Merge // Get replacements for that application if(!$app_replacements[$field]) { + // If we send the real content it can result in infinite loop of lookups + // so we send only the used fields + $content = $expand_sub_cfs[$field] ? $expand_sub_cfs[$field] : ''; $app_replacements[$field] = $this->get_app_replacements($field_app, $values['#'.$field], $content); } $replacements[$placeholders[$index]] = $app_replacements[$field]['$$'.$sub[$index].'$$'];