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:
Will Rossiter 2022-02-15 15:05:43 +13:00 committed by GitHub
parent 2a16e1eefa
commit dfe1ba5c6a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -281,7 +281,8 @@ class Subsite extends DataObject
/** @skipUpgrade */
$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.
return 0;
}