Skip to content

Commit

Permalink
Improve index checks
Browse files Browse the repository at this point in the history
Refs #713
  • Loading branch information
markstory committed Apr 29, 2024
1 parent 873025c commit d34fdad
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Util/TableFinder.php
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ public function getTablesToBake(CollectionInterface $collection, array $options

$config = (array)ConnectionManager::getConfig($this->connection);
$key = isset($config['schema']) ? 'schema' : 'database';
if (isset($split[0]) && $config[$key] === $split[1]) {
if (isset($split[0], $split[1]) && $config[$key] === $split[1]) {
$table = $split[0];
}
}
Expand Down Expand Up @@ -197,7 +197,7 @@ public function fetchTableName(string $className, ?string $pluginName = null): a
$config = ConnectionManager::getConfig($this->connection);
if ($config) {
$key = isset($config['schema']) ? 'schema' : 'database';
if (isset($splitted[0]) && $config[$key] === $splitted[1]) {
if (isset($splitted[0], $splitted[1]) && $config[$key] === $splitted[1]) {
$tableName = $splitted[0];
}
}
Expand Down

0 comments on commit d34fdad

Please sign in to comment.