diff --git a/includes/installer/CliInstaller.php b/includes/installer/CliInstaller.php index 31c7be9b876..59894c86ceb 100644 --- a/includes/installer/CliInstaller.php +++ b/includes/installer/CliInstaller.php @@ -289,13 +289,12 @@ class CliInstaller extends Installer { } public function showStatusMessage( Status $status ) { - $warnings = array_merge( $status->getWarningsArray(), - $status->getErrorsArray() ); - - if ( count( $warnings ) !== 0 ) { - foreach ( $warnings as $w ) { - $this->showMessage( ...$w ); - } + // Show errors at the end in CLI installer to make them easier to notice + foreach ( $status->getMessages( 'warning' ) as $msg ) { + $this->showMessage( $msg ); + } + foreach ( $status->getMessages( 'error' ) as $msg ) { + $this->showMessage( $msg ); } } diff --git a/includes/installer/WebInstaller.php b/includes/installer/WebInstaller.php index fa29c58de94..226c7d366f0 100644 --- a/includes/installer/WebInstaller.php +++ b/includes/installer/WebInstaller.php @@ -686,9 +686,12 @@ class WebInstaller extends Installer { } public function showStatusMessage( Status $status ) { - $errors = array_merge( $status->getErrorsArray(), $status->getWarningsArray() ); - foreach ( $errors as $error ) { - $this->showMessage( ...$error ); + // Show errors at the top in web installer to make them easier to notice + foreach ( $status->getMessages( 'error' ) as $msg ) { + $this->showMessage( $msg ); + } + foreach ( $status->getMessages( 'warning' ) as $msg ) { + $this->showMessage( $msg ); } }