While get_connection() used get_default_connection() if there is no specific connection,
(aka $name = null) , drop_connection() didn't and therefore did not drop a connection
if no specific name was given.
In Table::reestablish_connection() the connection (name) is retrieved like this:
This meant that if no static property 'connection' is set, the $connection will be null.
This should mean that the default connection is use, but currently nothing will be
dropped, which is a bug.
This fix changes that, so that if the default connection is used, the default connection is dropped.
An alternative might have been to change this in the call
(Table::reestablish_connection() for instance), but it seems to me that keeping
drop_connection's behaviour the same as get_connection() is the best way.
While
get_connection()
usedget_default_connection()
if there is no specific connection, (aka$name = null
) ,drop_connection()
didn't and therefore did not drop a connection if no specific name was given.In
Table::reestablish_connection()
the connection (name) is retrieved like this:This meant that if no static property 'connection' is set, the
$connection
will benull
. This should mean that the default connection is use, but currently nothing will be dropped, which is a bug. This fix changes that, so that if the default connection is used, the default connection is dropped.An alternative might have been to change this in the call (
Table::reestablish_connection()
for instance), but it seems to me that keepingdrop_connection
's behaviour the same asget_connection()
is the best way.