Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 14 additions & 6 deletions www/errorreport.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,20 @@
$data['directory'] = dirname(dirname(__FILE__));

if ($config->getBoolean('errorreporting', true)) {
$mail = new SimpleSAML\Utils\EMail('SimpleSAMLphp error report from ' . $email);
$mail->setData($data);
$mail->addReplyTo($email);
$mail->setText($text);
$mail->send();
SimpleSAML\Logger::error('Report with id ' . $reportId . ' sent');
if ($data['exceptionMsg'] !== 'not set' &&
$data['exceptionTrace'] !== 'not set' &&
$data['trackId'] !== 'not set' &&
$data['url'] !== 'not set'
) {
$mail = new SimpleSAML\Utils\EMail('SimpleSAMLphp error report from ' . $email);
$mail->setData($data);
$mail->addReplyTo($email);
$mail->setText($text);
$mail->send();
SimpleSAML\Logger::error('Report with id ' . $reportId . ' sent');
} else {
SimpleSAML\Logger::error('Report wasn\'t sent because any of mandatory fields wasn\'t filled');
}
}

// redirect the user back to this page to clear the POST request
Expand Down