Merge branch 'support/3.2.1' into support/3.2

This commit is contained in:
odain
2025-11-14 10:39:04 +01:00
16 changed files with 171 additions and 144 deletions

View File

@@ -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();

View File

@@ -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
*

View File

@@ -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;