Skip to content

Commit

Permalink
Improve type narrowing
Browse files Browse the repository at this point in the history
  • Loading branch information
markstory committed Jan 3, 2025
1 parent 6bc7b8b commit 414114b
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/Db/Adapter/MysqlAdapter.php
Original file line number Diff line number Diff line change
Expand Up @@ -1408,8 +1408,9 @@ protected function getIndexSqlDefinition(Index $index): string

$def .= ' KEY';

if (is_string($index->getName())) {
$def .= ' ' . $this->quoteColumnName($index->getName());
$name = $index->getName();
if (is_string($name)) {
$def .= ' ' . $this->quoteColumnName($name);
}

$columnNames = (array)$index->getColumns();
Expand Down

0 comments on commit 414114b

Please sign in to comment.