diff --git a/includes/presets/types/base-preset.php b/includes/presets/types/base-preset.php index 95755bb20..8d658edcd 100644 --- a/includes/presets/types/base-preset.php +++ b/includes/presets/types/base-preset.php @@ -49,13 +49,17 @@ abstract public function is_unique(): bool; abstract public function is_active_preset( $args ); public function set_init_data( $data = array() ): Base_Preset { - if ( empty( $this->data ) ) { - $this->data = $data; - } else { - $this->data = array_merge( $this->data, $data ); - } - - return $this; + if ( ! is_array( $data ) ) { + $data = array(); + } + if ( empty( $this->data ) ) { + $this->data = $data; + } else { + $this->data = array_merge( $this->data, $data ); + } + return $this; + + } /**