Skip to content
This repository has been archived by the owner on May 9, 2023. It is now read-only.

Commit

Permalink
minor fix
Browse files Browse the repository at this point in the history
  • Loading branch information
pauloamgomes committed Aug 20, 2018
1 parent e8478f5 commit 756a101
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions actions.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,16 @@
}

foreach ($data as $idx => $entry) {
foreach ($entry as $fieldName => $values) {
foreach ($entry as $fieldName => $values) {

// Check if current field in entry is defined by user, we don't want '_id' etc. to proceed.
if (!isset($fields[$fieldName])) {
continue;
}

switch ($fields[$fieldName]['type']) {
case 'repeater':
foreach ($data[$idx][$field['name']] as $idx1 => $repeatField) {
foreach ($data[$idx][$fieldName] as $idx1 => $repeatField) {
if (!isset($repeatField['value']['path'])) {
continue;
}
Expand All @@ -44,7 +44,10 @@
break;

case 'set':
foreach ($field['options']['fields'] as $idx1 => $subField) {
if (!isset($field['options']['fields'])) {
continue;
}
foreach ((array) $field['options']['fields'] as $idx1 => $subField) {
if (!isset($subField['styles']) || !is_array($subField['styles'])) {
continue;
}
Expand Down

0 comments on commit 756a101

Please sign in to comment.