mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-24 11:08:45 +02:00
Advanced Search: Small bug fixes and enhancements
SVN:trunk[5636]
This commit is contained in:
@@ -131,6 +131,15 @@ try
|
||||
// note: transform to cope with XSS attacks
|
||||
echo '<html><head></head><body><div>' . htmlentities($e->GetMessage(), ENT_QUOTES, 'utf-8') . '</div></body></html>';
|
||||
IssueLog::Error($e->getMessage()."\nDebug trace:\n".$e->getTraceAsString());
|
||||
} catch (MySQLException $e)
|
||||
{
|
||||
http_response_code(500);
|
||||
// Sanytize error:
|
||||
$sMsg = $e->GetMessage();
|
||||
$sMsg = preg_replace("@^.* mysql_error = @", '', $sMsg);
|
||||
// note: transform to cope with XSS attacks
|
||||
echo '<html><head></head><body><div>'.htmlentities($sMsg, ENT_QUOTES, 'utf-8').'</div></body></html>';
|
||||
IssueLog::Error($e->getMessage()."\nDebug trace:\n".$e->getTraceAsString());
|
||||
} catch (Exception $e)
|
||||
{
|
||||
http_response_code(500);
|
||||
|
||||
Reference in New Issue
Block a user