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;		
}

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions