explicitly close db connections - do not rely on process exit
This commit is contained in:
@@ -212,4 +212,13 @@ function dbesc_array(&$arr) {
|
||||
if(is_array($arr) && count($arr)) {
|
||||
array_walk($arr,'dbesc_array_cb');
|
||||
}
|
||||
}}
|
||||
}}
|
||||
|
||||
|
||||
if(! function_exists('closedb')) {
|
||||
function closedb() {
|
||||
global $db;
|
||||
if($db && $db->connected)
|
||||
$db->close();
|
||||
}}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user