Always connects to database, possible bug
BHare1985 opened this issue · 1 comments
BHare1985 commented
I am using connect
with $connect = false
, so it lazily establishes a connection (if needed). If no queries are executed, and thus no connection was required, it still connects to the database because it uses _connected()
to determine if the connection is closed in the free_result
of the deconstructor. I would think you would want to use $this->connection
over $this->_connected()
for checking if a connection is closed, or have a connection count to determine if it never connected then there shouldn't be anything to free.
stefangabos commented
You are right - thanks for the feedback!