N°6600 Portal download attachment : don't display anymore SQL query on attachment not found error (#525)

This commit is contained in:
Pierre Goiffon
2023-09-19 09:54:43 +02:00
committed by GitHub
parent 0a6c82dfe1
commit e5dd51f637
2 changed files with 12 additions and 2 deletions

View File

@@ -6723,7 +6723,13 @@ abstract class MetaModel
if ($bMustBeFound && empty($aRow))
{
throw new CoreException("No result for the single row query: '$sSQL'");
$sNotFoundErrorMessage = "No result for the single row query";
IssueLog::Info($sNotFoundErrorMessage, LogChannels::CMDB_SOURCE, [
'class' => $sClass,
'key' => $iKey,
'sql_query' => $sSQL,
]);
throw new CoreException($sNotFoundErrorMessage);
}
return $aRow;