Skip to content

Commit

Permalink
Ref #347 - Fix "Notice: Undefined index: name in sql-parser/src/Compo…
Browse files Browse the repository at this point in the history
…nents/Key.php on line 206"

Signed-off-by: William Desportes <williamdes@wdes.fr>
  • Loading branch information
williamdes committed Aug 20, 2021
1 parent 7d6a53b commit cc1d902
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/Components/Key.php
Expand Up @@ -203,7 +203,11 @@ public static function build($component, array $options = array())

$columns = array();
foreach ($component->columns as $column) {
$tmp = Context::escape($column['name']);
$tmp = '';
if (isset($column['name'])) {
$tmp .= Context::escape($column['name']);
}

if (isset($column['length'])) {
$tmp .= '(' . $column['length'] . ')';
}
Expand Down

0 comments on commit cc1d902

Please sign in to comment.