Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

V2.4 fix sqlite driver get foreign keys method #293

Merged

Conversation

krajcikondra
Copy link

@krajcikondra krajcikondra commented Oct 28, 2022

  • bug
  • BC break: no

Hi,

When I import data from files to sqlite3 database I got following error:

src/Database/Drivers/SqliteDriver.php:229
Trying to access array offset on value of type null

One thing is interesting. My colleague on OSX process import successfully without error.

nette/database v2.4.11
sqlite3 version: 3.27.2
OS: Linux

When I dump $keys[$row[‚id‘]] before line 229 I get:

{
  "name": 0,
  "local": "key",
  "table": "cache",
  "foreign": null,
  "onDelete": "CASCADE",
  "onUpdate": "NO ACTION"
}

Code dont assume foreign is null.

https://forum.nette.org/cs/35537-nette-database-a-sqlite3-trying-to-access-array-offset-on-value-of-type-null#p221775

@krajcikondra krajcikondra changed the base branch from master to v2.4 October 28, 2022 06:15
@krajcikondra krajcikondra force-pushed the v2.4_fix_SqliteDriver_getForeignKeys_method branch from 109047f to 6904acd Compare October 28, 2022 06:16
@dg dg merged commit c7a1431 into nette:v2.4 Nov 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants