From f2194d1749081ec139a5e396e90944d50f8da1d1 Mon Sep 17 00:00:00 2001 From: Nathaniel Catchpole <catch@35733.no-reply.drupal.org> Date: Wed, 2 Sep 2015 11:23:35 +0100 Subject: [PATCH] Issue #2560719 by stefan.r: Remove usage of t() string in the array keys for the database install tasks --- core/lib/Drupal/Core/Database/Install/Tasks.php | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/core/lib/Drupal/Core/Database/Install/Tasks.php b/core/lib/Drupal/Core/Database/Install/Tasks.php index fed2c5e3fcc4..9879998244df 100644 --- a/core/lib/Drupal/Core/Database/Install/Tasks.php +++ b/core/lib/Drupal/Core/Database/Install/Tasks.php @@ -79,7 +79,10 @@ abstract class Tasks { * * @var array */ - protected $results = array(); + protected $results = array( + 'fail' => array(), + 'pass' => array(), + ); /** * Ensure the PDO driver is supported by the version of PHP in use. @@ -92,14 +95,14 @@ protected function hasPdoDriver() { * Assert test as failed. */ protected function fail($message) { - $this->results[$message] = FALSE; + $this->results['fail'][] = $message; } /** * Assert test as a pass. */ protected function pass($message) { - $this->results[$message] = TRUE; + $this->results['pass'][] = $message; } /** @@ -149,11 +152,7 @@ public function runTasks() { } } } - // Filter out the success messages from results. - $errors = array_filter($this->results, function ($value) { - return !$value; - }); - return array_keys($errors); + return $this->results['fail']; } /** -- GitLab