mirror of
https://github.com/Combodo/iTop.git
synced 2026-02-12 23:14:18 +01:00
Merge branch 'support/3.2.1' into support/3.2
This commit is contained in:
@@ -597,12 +597,12 @@ class CMDBSource
|
||||
$oResult = DbConnectionWrapper::GetDbConnection(true)->query($sSql);
|
||||
} catch (mysqli_sql_exception $e) {
|
||||
self::LogDeadLock($e, true);
|
||||
throw new MySQLException('Failed to issue SQL query', ['query' => $sSql, $e]);
|
||||
throw new MySQLException('Failed to issue SQL query', ['query' => $sSql, $e, 'stack' => $e->getTraceAsString()]);
|
||||
} finally {
|
||||
$oKPI->ComputeStats('Query exec (mySQL)', $sSql);
|
||||
}
|
||||
if ($oResult === false) {
|
||||
$aContext = ['query' => $sSql];
|
||||
$aContext = ["\nstack" => (new Exception(''))->getTraceAsString(), "\nquery" => $sSql];
|
||||
|
||||
$iMySqlErrorNo = DbConnectionWrapper::GetDbConnection(true)->errno;
|
||||
$aMySqlHasGoneAwayErrorCodes = MySQLHasGoneAwayException::getErrorCodes();
|
||||
|
||||
@@ -70,6 +70,11 @@ class DesignDocument extends DOMDocument
|
||||
$this->preserveWhiteSpace = true; // otherwise the formatOutput option would have no effect
|
||||
}
|
||||
|
||||
public function loadXML(string $source, int $options = 0)
|
||||
{
|
||||
return parent::loadXML($source, $options | LIBXML_BIGLINES);
|
||||
}
|
||||
|
||||
/**
|
||||
* Overload of the standard API
|
||||
*
|
||||
|
||||
@@ -6193,12 +6193,14 @@ abstract class MetaModel
|
||||
|
||||
if ($bMustBeFound && empty($aRow)) {
|
||||
$sNotFoundErrorMessage = "No result for the single row query";
|
||||
IssueLog::Info($sNotFoundErrorMessage, LogChannels::CMDB_SOURCE, [
|
||||
$e = new CoreException($sNotFoundErrorMessage);
|
||||
IssueLog::Error($sNotFoundErrorMessage, LogChannels::CMDB_SOURCE, [
|
||||
'class' => $sClass,
|
||||
'key' => $iKey,
|
||||
'sql_query' => $sSQL,
|
||||
'stack' => $e->getTraceAsString(),
|
||||
]);
|
||||
throw new CoreException($sNotFoundErrorMessage);
|
||||
throw $e;
|
||||
}
|
||||
|
||||
return $aRow;
|
||||
|
||||
Reference in New Issue
Block a user