Fixed error that caused set placeholders method to break in the compiler
This commit is contained in:
parent
de2d957141
commit
ce200d2b7c
@ -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);
|
||||
|
@ -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))
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user