mirror of
https://github.com/silverstripe/silverstripe-subsites
synced 2024-10-22 09:05:55 +00:00
Merge branch '2.2'
This commit is contained in:
commit
1294671086
@ -44,8 +44,10 @@ class InitStateMiddleware implements HTTPMiddleware
|
|||||||
return $delegate($request);
|
return $delegate($request);
|
||||||
} catch (DatabaseException $ex) {
|
} catch (DatabaseException $ex) {
|
||||||
$message = $ex->getMessage();
|
$message = $ex->getMessage();
|
||||||
if (strpos($message, 'No database selected') !== false) {
|
if (strpos($message, 'No database selected') !== false
|
||||||
// Database is not ready, ignore and continue
|
|| 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);
|
return $delegate($request);
|
||||||
}
|
}
|
||||||
throw $ex;
|
throw $ex;
|
||||||
|
@ -17,6 +17,8 @@ class SubsiteTest extends BaseSubsiteTest
|
|||||||
{
|
{
|
||||||
protected static $fixture_file = 'SubsiteTest.yml';
|
protected static $fixture_file = 'SubsiteTest.yml';
|
||||||
|
|
||||||
|
protected $usesTransactions = false;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Original value of $_REQUEST
|
* Original value of $_REQUEST
|
||||||
*
|
*
|
||||||
|
Loading…
x
Reference in New Issue
Block a user