2
0
forked from Wavyzz/dolibarr

Fix warning

This commit is contained in:
Laurent Destailleur
2023-09-10 20:39:22 +02:00
parent 7f43ec2c3e
commit 58d7531048

View File

@@ -490,14 +490,14 @@ function getBrowserInfo($user_agent)
*/
function dol_shutdown()
{
global $user, $langs, $db;
global $db;
$disconnectdone = false;
$depth = 0;
if (is_object($db) && !empty($db->connected)) {
$depth = $db->transaction_opened;
$disconnectdone = $db->close();
}
dol_syslog("--- End access to ".$_SERVER["PHP_SELF"].(($disconnectdone && $depth) ? ' (Warn: db disconnection forced, transaction depth was '.$depth.')' : ''), (($disconnectdone && $depth) ? LOG_WARNING : LOG_INFO));
dol_syslog("--- End access to ".(empty($_SERVER["PHP_SELF"]) ? 'unknown' : $_SEVER["PHP_SELF"]).(($disconnectdone && $depth) ? ' (Warn: db disconnection forced, transaction depth was '.$depth.')' : ''), (($disconnectdone && $depth) ? LOG_WARNING : LOG_INFO));
}
/**