-
Notifications
You must be signed in to change notification settings - Fork 12
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
Add an additional condition before reconnect()
#47
Conversation
19544f8
to
e0a7043
Compare
Pull Request Test Coverage Report for Build 10923540520Details
💛 - Coveralls |
Isn't this a bug in the framework? |
I'm not sure how to treat this. The I think it is better to show the error than to hide it. In the sense of silently omitting the |
Does this PR fix the error when a connection to the database is lost? |
Yes, because in that case |
Okay. I got your opinion:
|
Thank you! |
Description
This PR checks if the connection has been established before we call the
reconnect()
method.When a connection to the database is lost, the
$this->db->connID
remains valid in terms of its existence, but the actual connection might be closed or invalid.There are no actual tests for this because I don't know how I can test it - we have a valid DB connection during the tests. Although I confirmed this was a bug and this change fixes it.
Needs
#46Fixes #45
Checklist: