mirror of
https://github.com/Combodo/iTop.git
synced 2026-02-13 07:24:13 +01:00
N°4558 Fix possible PHP notice in \CMDBSource::StartTransaction
This commit is contained in:
@@ -790,14 +790,14 @@ class CMDBSource
|
||||
private static function StartTransaction()
|
||||
{
|
||||
$aStackTrace = debug_backtrace(DEBUG_BACKTRACE_PROVIDE_OBJECT , 3);
|
||||
$sCaller = 'From '.$aStackTrace[1]['file'].'('.$aStackTrace[1]['line'].'): '.$aStackTrace[2]['class'].'->'.$aStackTrace[2]['function'].'()';
|
||||
|
||||
$bHasExistingTransactions = self::IsInsideTransaction();
|
||||
if (!$bHasExistingTransactions)
|
||||
{
|
||||
IssueLog::Trace("START TRANSACTION $sCaller", 'cmdbsource');
|
||||
IssueLog::Trace("START TRANSACTION was sent to the DB", LogChannels::CMDBSOURCE, ['stacktrace' => $aStackTrace]);
|
||||
self::DBQuery('START TRANSACTION');
|
||||
} else {
|
||||
IssueLog::Trace("Ignore nested (".self::$m_iTransactionLevel.") START TRANSACTION $sCaller", 'cmdbsource');
|
||||
IssueLog::Trace("START TRANSACTION ignored as a transaction is already opened", LogChannels::CMDBSOURCE, ['stacktrace' => $aStackTrace]);
|
||||
}
|
||||
|
||||
self::AddTransactionLevel();
|
||||
|
||||
@@ -539,10 +539,11 @@ class FileLog
|
||||
*/
|
||||
class LogChannels
|
||||
{
|
||||
const APC = 'apc';
|
||||
const CMDBSOURCE = 'cmdbsource';
|
||||
const DEADLOCK = 'DeadLock';
|
||||
const INLINE_IMAGE = 'InlineImage';
|
||||
const PORTAL = 'portal';
|
||||
const APC = 'apc';
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user