From 65a7ec635607e4f057e6a930bdfa2b96eaeef451 Mon Sep 17 00:00:00 2001 From: Quasel Date: Thu, 18 May 2017 11:02:56 +0200 Subject: [PATCH 1/4] fix foreach empty array --- classes/class-pods-page-data.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/classes/class-pods-page-data.php b/classes/class-pods-page-data.php index b66f9f8..efc51ee 100644 --- a/classes/class-pods-page-data.php +++ b/classes/class-pods-page-data.php @@ -346,9 +346,11 @@ private function recurse_pod_fields( $pod_name, $field_options = array(), $prefi if ( $field_options ) { if ( isset($field_options['type']) && $field_options['type'] === $field['type'] ) { - foreach ( $field_options['options'] as $_option => $option_value ) { - if ( $option_value !== pods_v( $_option, $field['options'] ) ) { - continue 2; // don't check further if one option it not matched + if ( isset ( $field_options['options'] ) ) { + foreach ( $field_options['options'] as $_option => $option_value ) { + if ( $option_value !== pods_v( $_option, $field['options'] ) ) { + continue 2; // don't check further if one option it not matched + } } } From f9aa56589f979b79fbe81e9152ad63827bb0bf59 Mon Sep 17 00:00:00 2001 From: Quasel Date: Thu, 18 May 2017 11:26:46 +0200 Subject: [PATCH 2/4] fix foreach empty array --- classes/class-pods-page-data.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/classes/class-pods-page-data.php b/classes/class-pods-page-data.php index efc51ee..b3c4a2e 100644 --- a/classes/class-pods-page-data.php +++ b/classes/class-pods-page-data.php @@ -349,7 +349,7 @@ private function recurse_pod_fields( $pod_name, $field_options = array(), $prefi if ( isset ( $field_options['options'] ) ) { foreach ( $field_options['options'] as $_option => $option_value ) { if ( $option_value !== pods_v( $_option, $field['options'] ) ) { - continue 2; // don't check further if one option it not matched + continue 2; // don't check further if one option is not matched } } } From 5fa6cbfb2ed4b3fae588c5fb10237fdb836f5679 Mon Sep 17 00:00:00 2001 From: Quasel Date: Thu, 18 May 2017 11:42:49 +0200 Subject: [PATCH 3/4] fix foreach empty array --- classes/class-pods-page-data.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/classes/class-pods-page-data.php b/classes/class-pods-page-data.php index b3c4a2e..1bf51ff 100644 --- a/classes/class-pods-page-data.php +++ b/classes/class-pods-page-data.php @@ -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 ) { From 7a7157aeb801e5ee85521f59689b0ad6c73bb086 Mon Sep 17 00:00:00 2001 From: Quasel Date: Thu, 18 May 2017 12:11:07 +0200 Subject: [PATCH 4/4] fix foreach empty array --- readme.txt | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/readme.txt b/readme.txt index a98fd8e..84ff019 100755 --- a/readme.txt +++ b/readme.txt @@ -4,7 +4,7 @@ Donate link: https://pods.io/friends-of-pods/ Tags: pods, beaver builder, beaver themer Requires at least: 4.0 Tested up to: 4.6 -Stable tag: 0.3.1-beta +Stable tag: 0.3.2-beta License: GPLv2 or later License URI: http://www.gnu.org/licenses/gpl-2.0.html @@ -28,6 +28,11 @@ To be done ;) == Changelog == += 0.3.2-beta - May 18, 2017 = + +* du to @alex testing added some edge case checks +* fixed default image + = 0.3.1-beta - May 17, 2017 = * Bug fix for illegal string offset