From a4a4113dac15f3035c938280a4ae041f276f3f1c Mon Sep 17 00:00:00 2001 From: alinasikorinska <88554848+alinasikorinska@users.noreply.github.com> Date: Sat, 23 May 2026 14:10:37 +0300 Subject: [PATCH 1/2] issue-18294 --- includes/presets/types/base-preset.php | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/includes/presets/types/base-preset.php b/includes/presets/types/base-preset.php index 95755bb20..78ae9b08c 100644 --- a/includes/presets/types/base-preset.php +++ b/includes/presets/types/base-preset.php @@ -49,13 +49,15 @@ 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; } /** From 95434a2fe4dc075a7ace3fb023dda1395be225a4 Mon Sep 17 00:00:00 2001 From: alinasikorinska <88554848+alinasikorinska@users.noreply.github.com> Date: Sat, 23 May 2026 14:11:38 +0300 Subject: [PATCH 2/2] issue-18294 --- includes/presets/types/base-preset.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/includes/presets/types/base-preset.php b/includes/presets/types/base-preset.php index 78ae9b08c..8d658edcd 100644 --- a/includes/presets/types/base-preset.php +++ b/includes/presets/types/base-preset.php @@ -58,6 +58,8 @@ public function set_init_data( $data = array() ): Base_Preset { $this->data = array_merge( $this->data, $data ); } return $this; + + } /**