mirror of
https://github.com/Combodo/iTop.git
synced 2026-02-15 08:24:10 +01:00
Fix "undefined offset" error during "Anonymize" action
This commit is contained in:
@@ -705,12 +705,11 @@ class CMDBSource
|
||||
private static function Commit()
|
||||
{
|
||||
$aStackTrace = debug_backtrace(DEBUG_BACKTRACE_PROVIDE_OBJECT , 3);
|
||||
if (isset($aStackTrace[2])) {
|
||||
if (array_key_exists(2,$aStackTrace)) {
|
||||
$sCaller = 'From '.$aStackTrace[1]['file'].'('.$aStackTrace[1]['line'].'): '.$aStackTrace[2]['class'].'->'.$aStackTrace[2]['function'].'()';
|
||||
} else {
|
||||
$sCaller = 'From '.$aStackTrace[1]['file'].'('.$aStackTrace[1]['line'].')';
|
||||
}
|
||||
if (!self::IsInsideTransaction()) {
|
||||
} if (!self::IsInsideTransaction()) {
|
||||
// should not happen !
|
||||
IssueLog::Error("No Transaction COMMIT $sCaller", LogChannels::CMDB_SOURCE);
|
||||
throw new MySQLNoTransactionException('Trying to commit transaction whereas none have been started !', null);
|
||||
@@ -743,7 +742,7 @@ class CMDBSource
|
||||
private static function Rollback()
|
||||
{
|
||||
$aStackTrace = debug_backtrace(DEBUG_BACKTRACE_PROVIDE_OBJECT , 3);
|
||||
if (isset($aStackTrace[2])) {
|
||||
if (array_key_exists(2,$aStackTrace)) {
|
||||
$sCaller = 'From '.$aStackTrace[1]['file'].'('.$aStackTrace[1]['line'].'): '.$aStackTrace[2]['class'].'->'.$aStackTrace[2]['function'].'()';
|
||||
} else {
|
||||
$sCaller = 'From '.$aStackTrace[1]['file'].'('.$aStackTrace[1]['line'].')';
|
||||
|
||||
Reference in New Issue
Block a user