From acd44a54991945bbba5f54bb02a908d051594a36 Mon Sep 17 00:00:00 2001 From: knoxcard Date: Sun, 29 Nov 2015 09:26:36 -0800 Subject: [PATCH] Line 63 added to prevent boolean type from being passed to array_merge --- Options.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Options.php b/Options.php index 502c7a7..70131ba 100644 --- a/Options.php +++ b/Options.php @@ -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() ) ); - return scbForms::get_value( $field, $data, $default ); }