diff --git a/core/lib/Drupal/Core/DrupalKernel.php b/core/lib/Drupal/Core/DrupalKernel.php index e1fafd0..23e26e2 100644 --- a/core/lib/Drupal/Core/DrupalKernel.php +++ b/core/lib/Drupal/Core/DrupalKernel.php @@ -1074,15 +1074,7 @@ protected function compileContainer() { */ protected function initializeServiceProviders() { $this->discoverServiceProviders(); - if (!isset($this->serviceProviders)) { - $this->serviceProviders = array(); - } - // Reset app service providers, so that uninstalled modules aren't reflected - // anymore. - $this->serviceProviders['app'] = []; - // Site specific service providers (and so tests) are kept. - - $this->serviceProviders += array( + $this->serviceProviders = array( 'app' => array(), 'site' => array(), ); diff --git a/core/lib/Drupal/Core/StreamWrapper/LocalStream.php b/core/lib/Drupal/Core/StreamWrapper/LocalStream.php index a387b73..765eb48 100644 --- a/core/lib/Drupal/Core/StreamWrapper/LocalStream.php +++ b/core/lib/Drupal/Core/StreamWrapper/LocalStream.php @@ -142,10 +142,7 @@ protected function getLocalPath($uri = NULL) { } $directory = realpath($this->getDirectoryPath()); if (!$realpath || !$directory || strpos($realpath, $directory) !== 0) { - throw new \RuntimeException(vsprintf("Unable to resolve URI %s to local path %s", array( - var_export($uri, TRUE), - var_export($path, TRUE), - ))); + return FALSE; } return $realpath; } diff --git a/core/modules/views/src/Plugin/views/query/Sql.php b/core/modules/views/src/Plugin/views/query/Sql.php index 8dd6e05..47d1979 100644 --- a/core/modules/views/src/Plugin/views/query/Sql.php +++ b/core/modules/views/src/Plugin/views/query/Sql.php @@ -1772,18 +1772,7 @@ public function getDateFormat($field, $format) { 'A' => '', ); $format = strtr($format, $replace); - $expression = "strftime('$format', $field, 'unixepoch')"; - // The expression yields a string, but the comparison value is an - // integer in case the comparison value is a float, integer, or numeric. - // All of the above SQLite format tokens only produce integers. However, - // the given $format may contain 'Y-m-d', which results in a string. - // @see \Drupal\Core\Database\Driver\sqlite\Connection::expandArguments() - // @see http://www.sqlite.org/lang_datefunc.html - // @see http://www.sqlite.org/lang_expr.html#castexpr - if (preg_match('/^(?:%\w)+$/', $format)) { - $expression = "CAST($expression AS NUMERIC)"; - } - return $expression; + return "strftime('$format', $field, 'unixepoch')"; } } diff --git a/core/tests/Drupal/Tests/KernelTestBase.php b/core/tests/Drupal/Tests/KernelTestBase.php index 5b6f6b5..aa2769a 100644 --- a/core/tests/Drupal/Tests/KernelTestBase.php +++ b/core/tests/Drupal/Tests/KernelTestBase.php @@ -650,6 +650,11 @@ protected function assertPostConditions() { * {@inheritdoc} */ protected function tearDown() { + // Destroy the testing kernel. + if (isset($this->kernel)) { + $this->kernel->shutdown(); + } + // Free up memory: Own properties. $this->classLoader = NULL; $this->vfsRoot = NULL;