Merge branch '2.2'

This commit is contained in:
Robbie Averill 2019-01-28 21:22:31 +02:00
commit 1294671086
2 changed files with 6 additions and 2 deletions

View File

@ -44,8 +44,10 @@ class InitStateMiddleware implements HTTPMiddleware
return $delegate($request);
} catch (DatabaseException $ex) {
$message = $ex->getMessage();
if (strpos($message, 'No database selected') !== false) {
// Database is not ready, ignore and continue
if (strpos($message, 'No database selected') !== false
|| preg_match('/\s*(table|relation) .* does(n\'t| not) exist/i', $message)
) {
// Database is not ready, ignore and continue. Either it doesn't exist or it has no tables
return $delegate($request);
}
throw $ex;

View File

@ -17,6 +17,8 @@ class SubsiteTest extends BaseSubsiteTest
{
protected static $fixture_file = 'SubsiteTest.yml';
protected $usesTransactions = false;
/**
* Original value of $_REQUEST
*