From e1649822ebbf08412a7a237e6df0da031488665d Mon Sep 17 00:00:00 2001 From: leogermani Date: Wed, 26 Jan 2022 15:11:06 -0300 Subject: [PATCH] fix the set_error_message logic (#22509) --- .../changelog/fix-install-skin-error-message | 4 ++++ .../plugins-installer/src/class-automatic-install-skin.php | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) create mode 100644 projects/packages/plugins-installer/changelog/fix-install-skin-error-message diff --git a/projects/packages/plugins-installer/changelog/fix-install-skin-error-message b/projects/packages/plugins-installer/changelog/fix-install-skin-error-message new file mode 100644 index 0000000000000..ec0f827ddbfda --- /dev/null +++ b/projects/packages/plugins-installer/changelog/fix-install-skin-error-message @@ -0,0 +1,4 @@ +Significance: patch +Type: fixed + +Fix method logic diff --git a/projects/packages/plugins-installer/src/class-automatic-install-skin.php b/projects/packages/plugins-installer/src/class-automatic-install-skin.php index 44363f5347b06..ae129c5975b32 100644 --- a/projects/packages/plugins-installer/src/class-automatic-install-skin.php +++ b/projects/packages/plugins-installer/src/class-automatic-install-skin.php @@ -84,7 +84,7 @@ private function set_main_error_code( $code ) { * @return void */ private function set_main_error_message( $message, $code ) { - $this->main_error_message = ( 'process_failed' === $code && $this->main_error_code ? $this->main_error_code : $message ); + $this->main_error_message = ( 'process_failed' === $code && $this->main_error_message ? $this->main_error_message : $message ); } /**