Skip to content

SQLiteDriver exception from getForeignKeys - incorrect results from PRAGMA foreign_key_list #281

Description

@SlavaAurim

This line throws exception:

if ($keys[$row['id']]['foreign'][0] == null) {

...because my sqlite (in php 8) return NULL in column 'to' in results from PRAGMA foreign_key_list(tablename)
Another columns has correct data.

This is simple fix:

if ($keys[$row['id']]['foreign'] //<== check if equal null
		&& $keys[$row['id']]['foreign'][0] == null) {
		$keys[$row['id']]['foreign'] = null;		
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions