mirror of
https://github.com/silverstripe/silverstripe-subsites
synced 2024-10-22 11:05:55 +02:00
FIX replace in_array check with hasTable
check.
in_array is case-sensitive and may not detect that a table exists when using lowercase format
This commit is contained in:
parent
2a16e1eefa
commit
dfe1ba5c6a
@ -281,7 +281,8 @@ class Subsite extends DataObject
|
|||||||
|
|
||||||
/** @skipUpgrade */
|
/** @skipUpgrade */
|
||||||
$domainTableName = $schema->tableName(SubsiteDomain::class);
|
$domainTableName = $schema->tableName(SubsiteDomain::class);
|
||||||
if (!in_array($domainTableName, DB::table_list())) {
|
|
||||||
|
if (!DB::get_schema()->hasTable($domainTableName)) {
|
||||||
// Table hasn't been created yet. Might be a dev/build, skip.
|
// Table hasn't been created yet. Might be a dev/build, skip.
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user