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

Line 63 added to prevent boolean type from being passed to array_merge #48

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

knoxcard
Copy link

New pull request to fix array_merge problem

@@ -59,8 +59,9 @@ public function get_key() {
* @return mixed Whatever is in those fields.
*/
public function get( $field = null, $default = null ) {
$option_array = get_option( $this->key, array() );
$option_array = gettype($option_array) != "array" ? [] : $option_array;
$data = array_merge( $this->defaults, get_option( $this->key, array() ) );

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You might need to use $option_array on this line. Otherwise the PR doesn't do anything.

@scribu
Copy link
Owner

scribu commented Nov 29, 2015

Hey, guys.

Glad to see all this activity around here. :)

Let me know when this is ready for merging.

@meloniq
Copy link
Contributor

meloniq commented Nov 29, 2015

Yeah, as always, I was late for warm welcome :) :P

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants