Skip to content

Commit

Permalink
Prevent exception when checked schema is empty
Browse files Browse the repository at this point in the history
  • Loading branch information
cedric-anne committed Oct 16, 2023
1 parent 5eb7c82 commit 6b1cccd
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/System/Diagnostic/DatabaseSchemaIntegrityChecker.php
Original file line number Diff line number Diff line change
Expand Up @@ -286,13 +286,14 @@ public function checkCompleteSchema(
}

if ($include_unknown_tables) {
$unknown_tables_criteria = [
[
$unknown_tables_criteria = [];
if (count($schema) > 0) {
$unknown_tables_criteria[] = [
'NOT' => [
'table_name' => array_keys($schema)
]
],
];
];
}
$is_context_valid = true;
if ($context === 'core') {
$unknown_tables_criteria[] = [
Expand Down

0 comments on commit 6b1cccd

Please sign in to comment.