diff --git a/admin/helpers/compiler/a_Get.php b/admin/helpers/compiler/a_Get.php index 5dc5fa352..c234f44ae 100644 --- a/admin/helpers/compiler/a_Get.php +++ b/admin/helpers/compiler/a_Get.php @@ -5427,6 +5427,13 @@ class Get */ public function setPlaceholders(&$data, &$placeholder, $action = 1) { + // make sure the placeholders is an array + if (!ComponentbuilderHelper::checkArray($placeholder)) + { + // This is an error, (TODO) actualy we need to add a kind of log here to know that this happened + return $data; + } + // continue with the work of replacement if (1 == $action) // <-- just replace (default) { return str_replace(array_keys($placeholder), array_values($placeholder), $data); diff --git a/admin/helpers/compiler/c_Fields.php b/admin/helpers/compiler/c_Fields.php index 642e921e9..ba18df700 100644 --- a/admin/helpers/compiler/c_Fields.php +++ b/admin/helpers/compiler/c_Fields.php @@ -1387,7 +1387,7 @@ class Fields extends Structure // add the tabs needed $r_taber = "\t\t\t"; // get field values - $r_fieldValues = $this->setFieldAttributes($fieldData, $view, $r_name, $r_typeName, $r_multiple, $r_langLabel, $langView, $spacerCounter, $view_name_list, $view_name_single, $placeholders, true); + $r_fieldValues = $this->setFieldAttributes($fieldData, $view, $r_name, $r_typeName, $r_multiple, $r_langLabel, $langView, $view_name_list, $view_name_single, $placeholders, true); // check if values were set if (ComponentbuilderHelper::checkArray($r_fieldValues)) { @@ -1474,7 +1474,7 @@ class Fields extends Structure // add the tabs needed $r_taber = "\t\t"; // get field values - $r_fieldValues = $this->setFieldAttributes($fieldData, $view, $r_name, $r_typeName, $r_multiple, $r_langLabel, $langView, $spacerCounter, $view_name_list, $view_name_single, $placeholders, true); + $r_fieldValues = $this->setFieldAttributes($fieldData, $view, $r_name, $r_typeName, $r_multiple, $r_langLabel, $langView, $view_name_list, $view_name_single, $placeholders, true); // check if values were set if (ComponentbuilderHelper::checkArray($r_fieldValues)) {