Loading core/lib/Drupal/Core/DrupalKernel.php +3 −11 Original line number Diff line number Diff line Loading @@ -10,7 +10,6 @@ use Drupal\Core\Cache\DatabaseBackend; use Drupal\Core\Config\BootstrapConfigStorageFactory; use Drupal\Core\Config\NullStorage; use Drupal\Core\Database\Database; use Drupal\Core\DependencyInjection\ContainerBuilder; use Drupal\Core\DependencyInjection\ServiceModifierInterface; use Drupal\Core\DependencyInjection\ServiceProviderInterface; Loading Loading @@ -664,18 +663,11 @@ public function handle(Request $request, $type = self::MAIN_REQUEST, $catch = TR static::bootEnvironment(); try { if (!$this->booted) { $this->initializeSettings($request); // Redirect the user to the installation script if Drupal has not been // installed yet (i.e., if no $databases array has been defined in the // settings.php file) and we are not already installing. if (!Database::getConnectionInfo() && !InstallerKernel::installationAttempted() && PHP_SAPI !== 'cli') { $response = new RedirectResponse($request->getBasePath() . '/core/install.php', 302, ['Cache-Control' => 'no-cache']); } else { $this->boot(); $response = $this->getHttpKernel()->handle($request, $type, $catch); } $response = $this->getHttpKernel()->handle($request, $type, $catch); } catch (\Exception $e) { if ($catch === FALSE) { Loading core/lib/Drupal/Core/Installer/InstallerRedirectTrait.php +2 −1 Original line number Diff line number Diff line Loading @@ -3,6 +3,7 @@ namespace Drupal\Core\Installer; use Drupal\Core\Database\Connection; use Drupal\Core\Database\ConnectionNotDefinedException; use Drupal\Core\Database\Database; use Drupal\Core\Database\DatabaseException; use Drupal\Core\Database\DatabaseNotFoundException; Loading Loading @@ -51,7 +52,7 @@ protected function shouldRedirectToInstaller(\Exception $exception, Connection $ // If the database wasn't found, assume the user hasn't entered it properly // and redirect to the installer. This check needs to come first because a // DatabaseNotFoundException is also an instance of DatabaseException. if ($exception instanceof DatabaseNotFoundException) { if ($exception instanceof DatabaseNotFoundException || $exception instanceof ConnectionNotDefinedException) { return TRUE; } Loading Loading
core/lib/Drupal/Core/DrupalKernel.php +3 −11 Original line number Diff line number Diff line Loading @@ -10,7 +10,6 @@ use Drupal\Core\Cache\DatabaseBackend; use Drupal\Core\Config\BootstrapConfigStorageFactory; use Drupal\Core\Config\NullStorage; use Drupal\Core\Database\Database; use Drupal\Core\DependencyInjection\ContainerBuilder; use Drupal\Core\DependencyInjection\ServiceModifierInterface; use Drupal\Core\DependencyInjection\ServiceProviderInterface; Loading Loading @@ -664,18 +663,11 @@ public function handle(Request $request, $type = self::MAIN_REQUEST, $catch = TR static::bootEnvironment(); try { if (!$this->booted) { $this->initializeSettings($request); // Redirect the user to the installation script if Drupal has not been // installed yet (i.e., if no $databases array has been defined in the // settings.php file) and we are not already installing. if (!Database::getConnectionInfo() && !InstallerKernel::installationAttempted() && PHP_SAPI !== 'cli') { $response = new RedirectResponse($request->getBasePath() . '/core/install.php', 302, ['Cache-Control' => 'no-cache']); } else { $this->boot(); $response = $this->getHttpKernel()->handle($request, $type, $catch); } $response = $this->getHttpKernel()->handle($request, $type, $catch); } catch (\Exception $e) { if ($catch === FALSE) { Loading
core/lib/Drupal/Core/Installer/InstallerRedirectTrait.php +2 −1 Original line number Diff line number Diff line Loading @@ -3,6 +3,7 @@ namespace Drupal\Core\Installer; use Drupal\Core\Database\Connection; use Drupal\Core\Database\ConnectionNotDefinedException; use Drupal\Core\Database\Database; use Drupal\Core\Database\DatabaseException; use Drupal\Core\Database\DatabaseNotFoundException; Loading Loading @@ -51,7 +52,7 @@ protected function shouldRedirectToInstaller(\Exception $exception, Connection $ // If the database wasn't found, assume the user hasn't entered it properly // and redirect to the installer. This check needs to come first because a // DatabaseNotFoundException is also an instance of DatabaseException. if ($exception instanceof DatabaseNotFoundException) { if ($exception instanceof DatabaseNotFoundException || $exception instanceof ConnectionNotDefinedException) { return TRUE; } Loading