Skip to content

Commit 12fb150

Browse files
authored
Do not add null columns when getting foreign keys (#728)
1 parent 70a673c commit 12fb150

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Tqdev/PhpCrudApi/Column/Reflection/ReflectedTable.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ public function getFksTo(string $tableName): array
137137
{
138138
$columns = array();
139139
foreach ($this->fks as $columnName => $referencedTableName) {
140-
if ($tableName == $referencedTableName) {
140+
if ($tableName == $referencedTableName && !is_null($this->columns[$columnName])) {
141141
$columns[] = $this->columns[$columnName];
142142
}
143143
}

0 commit comments

Comments
 (0)