[ticket/16740] Use is_resource() to check whether connect id is still valid

PHPBB3-16740
This commit is contained in:
Marc Alexander 2021-03-31 21:22:14 +02:00
parent e8afa29013
commit 4ce8224c2c
No known key found for this signature in database
GPG key ID: 50E0D2423696F995

View file

@ -467,7 +467,7 @@ class postgres extends \phpbb\db\driver\driver
function _sql_close() function _sql_close()
{ {
// Released resources are already closed, return true in this case // Released resources are already closed, return true in this case
if (get_resource_type($this->db_connect_id) === 'Unknown') if (!is_resource($this->db_connect_id))
{ {
return true; return true;
} }