Fix message handling on InstallActionHandler

This commit is contained in:
Clemente Raposo 2025-01-13 13:06:39 +00:00 committed by c.raposo
parent 627d886600
commit a2c7628722

View file

@ -133,7 +133,7 @@ class InstallActionHandler implements ProcessHandlerInterface
}
}
if(!empty($missingOptions)){
if (!empty($missingOptions)) {
$process->setStatus('error');
$process->setMessages(['Missing required options: ' . implode(', ', $missingOptions)]);
$process->setData([]);
@ -232,11 +232,17 @@ class InstallActionHandler implements ProcessHandlerInterface
return ['LBL_SILENT_INSTALL_SUCCESS'];
}
$messages = [];
if (!empty($result->getMessageLabels())) {
return [$result->getMessageLabels()[0]];
$messages = $result->getMessageLabels();
}
return $result->getMessageLabels();
if (!empty($result->getMessages())) {
$messages = array_merge($messages, $result->getMessages());
}
return $messages;
}
}