Merge pull request #476 from wilr/wilr-patch-1

FIX replace `in_array` check with `hasTable` check
This commit is contained in:
Michal Kleiner 2022-02-15 15:39:46 +13:00 committed by GitHub
commit 5c3d000b9b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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;
} }