-
Notifications
You must be signed in to change notification settings - Fork 19
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
Finalize only if db is available #78
Conversation
pr failure not related |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One small suggested change, though I don't use sqlite so really it's up to you either way.
Would you like to be added as a maintainer for this module, since it's no longer commercially maintained?
code/SQLite3Query.php
Outdated
@@ -39,7 +39,7 @@ public function __construct(SQLite3Connector $database, SQLite3Result $handle) | |||
|
|||
public function __destruct() | |||
{ | |||
if ($this->handle) { | |||
if ($this->handle && $this->database->getSelectedDatabase()) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would isActive()
be more appropriate to call here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes is active should work just as well but brings no additional benefit except being probably more correct semantically
if you see, unloading the db remove the databaseName and close the connection. isActive only checks if there is a dbConn object... and there would be a closed one. :-) so either way should work just fine. i don't think there is a way to check if the dbConn was indeed closed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yup that's what I was thinking too. If you change it to isActive()
I'll be happy to merge. I like semantically correct ;p
@GuySartorelli i'm happy to be added as a maintainer but i know i'm obviously less strict than you guys are when it comes to releasing new versions ;-) |
That's fine - this is no longer a commercially supported module, so it's not restricted by the minor or major release policies.
Yup, no worries there. It's effectively a community module at this stage - just no community member has stepped up to maintain it yet. I'll add you as a maintainer. Edit: Ignore the email that invites you to a team - I thought I could create a repo-level team but that doesn't seem to be the case. I've added you as a maintainer directly to this repository. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, as you said, the ci failures are unrelated.
Fixes #77
Description
See issue for context
Manual testing steps
Issues
#77
Pull request checklist