Skip to content

Commit

Permalink
fix foreach empty array
Browse files Browse the repository at this point in the history
  • Loading branch information
quasel committed May 18, 2017
1 parent f9aa565 commit 5fa6cbf
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion classes/class-pods-page-data.php
Original file line number Diff line number Diff line change
Expand Up @@ -323,7 +323,11 @@ private function recurse_pod_fields( $pod_name, $field_options = array(), $prefi
$pod = pods( $pod_name );
$recurse_queue = array();

$all_pod_fields = array_merge( $pod->pod_data['object_fields'], $pod->fields() );
if ( isset( $pod->pod_data['object_fields'] ) ) {
$all_pod_fields = array_merge( $pod->pod_data['object_fields'], $pod->fields() );
} else {
$all_pod_fields = $pod->fields();
}


foreach ( $all_pod_fields as $field_name => $field ) {
Expand Down

0 comments on commit 5fa6cbf

Please sign in to comment.