mirror of
https://github.com/dg/dibi.git
synced 2025-02-22 18:02:25 +01:00
fix TypeError: substr() expects parameter 1 to be string, null given (#306)
This commit is contained in:
parent
15df96bb22
commit
4abe874ce9
@ -130,7 +130,7 @@ class PostgreReflector implements Dibi\Reflector
|
||||
'size' => $size > 0 ? $size : null,
|
||||
'nullable' => $row['is_nullable'] === 'YES' || $row['is_nullable'] === 't' || $row['is_nullable'] === true,
|
||||
'default' => $row['column_default'],
|
||||
'autoincrement' => (int) $row['ordinal_position'] === $primary && substr($row['column_default'], 0, 7) === 'nextval',
|
||||
'autoincrement' => (int) $row['ordinal_position'] === $primary && substr($row['column_default'] ?? '', 0, 7) === 'nextval',
|
||||
'vendor' => $row,
|
||||
];
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user