Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix foreach check_value loop by checking first if it is an array #5205

Merged
merged 2 commits into from
Jun 13, 2019

Conversation

ziqbal
Copy link
Contributor

@ziqbal ziqbal commented Nov 22, 2018

Description

Advanced search filter in Admin UI was giving (after choosing any criteria):
Warning: Invalid argument supplied for foreach() in .../wp-content/plugins/pods/classes/fields/pick.php on line 1818

Using:
Pods - Custom Content Types and Fields: 2.7.9
WordPress Version: 5.0-beta5
PHP Version: 7.2.12

Types of changes

IF check before foreach loop to test if $check_value variable is an array or not.

Changelog

Avoid PHP warnings by removing unused $check_value logic in PodsField_Pick

@JoryHogeveen
Copy link
Member

@sc0ttkclark Please check my latest change.
It appears that this code was never used at all...
Original code (first commit found through Git blame):
9ee5d50#diff-1ca5a4ce2807504d1a97028fc9959802R1273

@sc0ttkclark sc0ttkclark added Status: PR > QA pass QA passed and removed Status: PR > QA pending QA needs to be done labels Jun 13, 2019
@sc0ttkclark sc0ttkclark merged commit b536ec7 into pods-framework:2.x Jun 13, 2019
JoryHogeveen added a commit that referenced this pull request Jun 25, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants