Skip to content

Conversation

@ndossche
Copy link
Member

No description provided.

Copy link
Member

@devnexen devnexen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

definitely a bug and proper fix but just judging it (no test ?)

@ndossche
Copy link
Member Author

The php_sqlite3_error line is never hit in our test suite, and I'm not sure how to trigger it.
This can be observed by placing an abort(); under the case and seeing that every test passes.

@plusminmax
Copy link

was something like this

$db = new SQLite3(':memory:');
$db->exec('CREATE TABLE a(b TEXT DEFAULT "oops", UNIQUE(b));');
$pre = $db->prepare('BEGIN;')->execute()->fetchArray();
$db->close();

@ndossche
Copy link
Member Author

Thanks @plusminmax , slightly reduced test committed!

--FILE--
<?php
$db = new SQLite3(':memory:');
$db->prepare('BEGIN;')->execute()->fetchArray();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you might want to print it.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

SQLite3Result fetchArray return array|false, null returned

3 participants